github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/ilist/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance") 3 4 package(licenses = ["notice"]) 5 6 go_library( 7 name = "ilist", 8 srcs = [ 9 "interface_list.go", 10 ], 11 visibility = ["//visibility:public"], 12 ) 13 14 go_template_instance( 15 name = "interface_list", 16 out = "interface_list.go", 17 package = "ilist", 18 template = ":generic_list", 19 types = {}, 20 ) 21 22 # This list is used for benchmarking. 23 go_template_instance( 24 name = "test_list", 25 out = "test_list.go", 26 package = "ilist", 27 prefix = "direct", 28 template = ":generic_list", 29 types = { 30 "Element": "*direct", 31 "Linker": "*direct", 32 }, 33 ) 34 35 go_test( 36 name = "list_test", 37 size = "small", 38 srcs = [ 39 "list_test.go", 40 "test_list.go", 41 ], 42 library = ":ilist", 43 ) 44 45 go_template( 46 name = "generic_list", 47 srcs = [ 48 "list.go", 49 ], 50 opt_types = [ 51 "Element", 52 "ElementMapper", 53 "Linker", 54 ], 55 visibility = ["//visibility:public"], 56 )