BUILD 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 = [
  10. "dao_test.go",
  11. "memcache_test.go",
  12. "mysql_test.go",
  13. ],
  14. embed = [":go_default_library"],
  15. rundir = ".",
  16. tags = ["automanaged"],
  17. deps = [
  18. "//app/service/main/point/conf:go_default_library",
  19. "//app/service/main/point/model:go_default_library",
  20. "//library/time:go_default_library",
  21. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  22. ],
  23. )
  24. go_library(
  25. name = "go_default_library",
  26. srcs = [
  27. "dao.go",
  28. "memcache.go",
  29. "mysql.go",
  30. ],
  31. importpath = "go-common/app/service/main/point/dao",
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. deps = [
  35. "//app/service/main/point/conf:go_default_library",
  36. "//app/service/main/point/model:go_default_library",
  37. "//library/cache/memcache:go_default_library",
  38. "//library/database/sql:go_default_library",
  39. "//library/stat/prom:go_default_library",
  40. "//library/time:go_default_library",
  41. "//vendor/github.com/pkg/errors:go_default_library",
  42. ],
  43. )
  44. filegroup(
  45. name = "package-srcs",
  46. srcs = glob(["**"]),
  47. tags = ["automanaged"],
  48. visibility = ["//visibility:private"],
  49. )
  50. filegroup(
  51. name = "all-srcs",
  52. srcs = [":package-srcs"],
  53. tags = ["automanaged"],
  54. visibility = ["//visibility:public"],
  55. )