github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/buffer/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 = "buffer_list", 8 out = "buffer_list.go", 9 package = "buffer", 10 prefix = "buffer", 11 template = "//pkg/ilist:generic_list", 12 types = { 13 "Element": "*buffer", 14 "Linker": "*buffer", 15 }, 16 ) 17 18 go_library( 19 name = "buffer", 20 srcs = [ 21 "buffer.go", 22 "buffer_list.go", 23 "pool.go", 24 "view.go", 25 "view_unsafe.go", 26 ], 27 visibility = ["//visibility:public"], 28 deps = [ 29 "//pkg/context", 30 "//pkg/log", 31 ], 32 ) 33 34 go_test( 35 name = "buffer_test", 36 size = "small", 37 srcs = [ 38 "buffer_test.go", 39 "pool_test.go", 40 "view_test.go", 41 ], 42 library = ":buffer", 43 deps = [ 44 "//pkg/state", 45 ], 46 )