load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "go_default_library",
    srcs = ["main.go"],
    importmap = "sigs.k8s.io/cluster-api-provider-azure/vendor/sigs.k8s.io/controller-tools/cmd/controller-gen",
    importpath = "sigs.k8s.io/controller-tools/cmd/controller-gen",
    visibility = ["//visibility:private"],
    deps = [
        "//vendor/github.com/spf13/cobra:go_default_library",
        "//vendor/sigs.k8s.io/controller-tools/pkg/crd/generator:go_default_library",
        "//vendor/sigs.k8s.io/controller-tools/pkg/rbac:go_default_library",
        "//vendor/sigs.k8s.io/controller-tools/pkg/webhook:go_default_library",
    ],
)

go_binary(
    name = "controller-gen",
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
)
