BUILD 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. )
  7. go_test(
  8. name = "go_default_test",
  9. srcs = ["limit_test.go"],
  10. embed = [":go_default_library"],
  11. rundir = ".",
  12. tags = ["automanaged"],
  13. deps = ["//library/net/http/blademaster:go_default_library"],
  14. )
  15. go_library(
  16. name = "go_default_library",
  17. srcs = ["limit.go"],
  18. importpath = "go-common/library/net/http/blademaster/middleware/rate",
  19. tags = ["automanaged"],
  20. visibility = ["//visibility:public"],
  21. deps = [
  22. "//library/log:go_default_library",
  23. "//library/net/http/blademaster:go_default_library",
  24. "//vendor/golang.org/x/time/rate:go_default_library",
  25. ],
  26. )
  27. go_test(
  28. name = "go_default_xtest",
  29. srcs = ["example_test.go"],
  30. tags = ["automanaged"],
  31. deps = [
  32. "//library/net/http/blademaster:go_default_library",
  33. "//library/net/http/blademaster/middleware/rate:go_default_library",
  34. ],
  35. )
  36. filegroup(
  37. name = "package-srcs",
  38. srcs = glob(["**"]),
  39. tags = ["automanaged"],
  40. visibility = ["//visibility:private"],
  41. )
  42. filegroup(
  43. name = "all-srcs",
  44. srcs = [":package-srcs"],
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. )