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

go_library(
    name = "label",
    srcs = ["label.go"],
    importpath = "github.com/bazelbuild/bazel-gazelle/label",
    visibility = ["//visibility:public"],
    deps = ["//pathtools"],
)

go_test(
    name = "label_test",
    srcs = ["label_test.go"],
    embed = [":label"],
)

filegroup(
    name = "all_files",
    testonly = True,
    srcs = [
        "BUILD.bazel",
        "label.go",
        "label_test.go",
    ],
    visibility = ["//visibility:public"],
)

alias(
    name = "go_default_library",
    actual = ":label",
    visibility = ["//visibility:public"],
)
