• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
2
3go_library(
4    name = "lib",
5    srcs = ["lib.go"],
6    importpath = "lib",
7)
8
9go_test(
10    name = "lib_test",
11    srcs = ["lib_test.go"],
12    embed = [":lib"],
13)
14
15go_binary(
16    name = "bin",
17    srcs = ["bin.go"],
18)
19
20filegroup(
21    name = "compilation_outputs",
22    testonly = True,
23    srcs = [
24        ":bin",
25        ":lib",
26        ":lib_test",
27    ],
28    output_group = "compilation_outputs",
29)
30
31go_test(
32    name = "compilation_outputs_test",
33    srcs = ["compilation_outputs_test.go"],
34    data = [":compilation_outputs"],
35    deps = ["//go/tools/bazel:go_default_library"],
36)
37