BUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_library",
  5. "go_test",
  6. )
  7. go_library(
  8. name = "go_default_library",
  9. srcs = [
  10. "dao.go",
  11. "mysql.go",
  12. ],
  13. importpath = "go-common/app/infra/canal/dao",
  14. tags = ["automanaged"],
  15. visibility = ["//visibility:public"],
  16. deps = [
  17. "//app/infra/canal/conf:go_default_library",
  18. "//app/infra/canal/model:go_default_library",
  19. "//library/database/sql:go_default_library",
  20. "//library/log:go_default_library",
  21. ],
  22. )
  23. filegroup(
  24. name = "package-srcs",
  25. srcs = glob(["**"]),
  26. tags = ["automanaged"],
  27. visibility = ["//visibility:private"],
  28. )
  29. filegroup(
  30. name = "all-srcs",
  31. srcs = [":package-srcs"],
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. )
  35. go_test(
  36. name = "go_default_test",
  37. srcs = [
  38. "dao_test.go",
  39. "mysql_test.go",
  40. ],
  41. embed = [":go_default_library"],
  42. rundir = ".",
  43. tags = ["automanaged"],
  44. deps = [
  45. "//app/infra/canal/conf:go_default_library",
  46. "//app/infra/canal/model:go_default_library",
  47. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  48. ],
  49. )