github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/internal/gazellebinarytest/BUILD.bazel (about)

     1  load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
     2  load("//:def.bzl", "gazelle_binary")
     3  
     4  gazelle_binary(
     5      name = "gazelle_go_x",
     6      # keep
     7      languages = [
     8          "//language/go",
     9          ":gazellebinarytest",
    10      ],
    11  )
    12  
    13  go_library(
    14      name = "gazellebinarytest",
    15      srcs = ["xlang.go"],
    16      importpath = "github.com/bazelbuild/bazel-gazelle/internal/gazellebinarytest",
    17      visibility = ["//:__subpackages__"],
    18      deps = [
    19          "//config",
    20          "//label",
    21          "//language",
    22          "//repo",
    23          "//resolve",
    24          "//rule",
    25      ],
    26  )
    27  
    28  go_test(
    29      name = "gazellebinarytest_test",
    30      srcs = ["gazellebinary_test.go"],
    31      data = [":gazelle_go_x"],
    32      embed = [":gazellebinarytest"],
    33      rundir = ".",
    34      deps = [
    35          "//testtools",
    36          "@io_bazel_rules_go//go/tools/bazel:go_default_library",
    37      ],
    38  )
    39  
    40  filegroup(
    41      name = "all_files",
    42      testonly = True,
    43      srcs = [
    44          "BUILD.bazel",
    45          "gazellebinary_test.go",
    46          "xlang.go",
    47      ],
    48      visibility = ["//visibility:public"],
    49  )
    50  
    51  alias(
    52      name = "go_default_library",
    53      actual = ":gazellebinarytest",
    54      visibility = ["//:__subpackages__"],
    55  )