github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/refs/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template_instance")
     3  
     4  package(licenses = ["notice"])
     5  
     6  go_template_instance(
     7      name = "weak_ref_list",
     8      out = "weak_ref_list.go",
     9      package = "refs",
    10      prefix = "weakRef",
    11      template = "//pkg/ilist:generic_list",
    12      types = {
    13          "Element": "*WeakRef",
    14          "Linker": "*WeakRef",
    15      },
    16  )
    17  
    18  go_library(
    19      name = "refs",
    20      srcs = [
    21          "refcounter.go",
    22          "refcounter_state.go",
    23          "weak_ref_list.go",
    24      ],
    25      visibility = ["//:sandbox"],
    26      deps = [
    27          "//pkg/context",
    28          "//pkg/log",
    29          "//pkg/sync",
    30      ],
    31  )
    32  
    33  go_test(
    34      name = "refs_test",
    35      size = "small",
    36      srcs = ["refcounter_test.go"],
    37      library = ":refs",
    38      deps = [
    39          "//pkg/context",
    40          "//pkg/sync",
    41      ],
    42  )