github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/language/go/testdata/bin_with_tests/BUILD.want (about) 1 load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") 2 3 go_library( 4 name = "bin_with_tests_lib", 5 srcs = ["main.go"], 6 _gazelle_imports = [ 7 "example.com/repo/lib", 8 "fmt", 9 ], 10 importpath = "example.com/repo/bin_with_tests", 11 visibility = ["//visibility:private"], 12 ) 13 14 go_binary( 15 name = "bin_with_tests", 16 _gazelle_imports = [], 17 embed = [":bin_with_tests_lib"], 18 visibility = ["//visibility:public"], 19 ) 20 21 go_test( 22 name = "bin_with_tests_test", 23 srcs = ["bin_test.go"], 24 _gazelle_imports = ["testing"], 25 embed = [":bin_with_tests_lib"], 26 )