BUILD 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 = ["antispam_test.go"],
  10. embed = [":go_default_library"],
  11. rundir = ".",
  12. tags = ["automanaged"],
  13. deps = [
  14. "//library/cache/redis:go_default_library",
  15. "//library/container/pool:go_default_library",
  16. "//library/net/http/blademaster:go_default_library",
  17. "//library/time:go_default_library",
  18. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  19. ],
  20. )
  21. go_library(
  22. name = "go_default_library",
  23. srcs = ["antispam.go"],
  24. importpath = "go-common/library/net/http/blademaster/middleware/antispam",
  25. tags = ["automanaged"],
  26. visibility = ["//visibility:public"],
  27. deps = [
  28. "//library/cache/redis:go_default_library",
  29. "//library/ecode:go_default_library",
  30. "//library/log:go_default_library",
  31. "//library/net/http/blademaster:go_default_library",
  32. "//vendor/github.com/pkg/errors:go_default_library",
  33. ],
  34. )
  35. go_test(
  36. name = "go_default_xtest",
  37. srcs = ["example_test.go"],
  38. tags = ["automanaged"],
  39. deps = [
  40. "//library/cache/redis:go_default_library",
  41. "//library/container/pool:go_default_library",
  42. "//library/net/http/blademaster:go_default_library",
  43. "//library/net/http/blademaster/middleware/antispam:go_default_library",
  44. "//library/time:go_default_library",
  45. ],
  46. )
  47. filegroup(
  48. name = "package-srcs",
  49. srcs = glob(["**"]),
  50. tags = ["automanaged"],
  51. visibility = ["//visibility:private"],
  52. )
  53. filegroup(
  54. name = "all-srcs",
  55. srcs = [":package-srcs"],
  56. tags = ["automanaged"],
  57. visibility = ["//visibility:public"],
  58. )