BUILD 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. package(default_visibility = ["//visibility:public"])
  7. filegroup(
  8. name = "package-srcs",
  9. srcs = glob(["**"]),
  10. tags = ["automanaged"],
  11. visibility = ["//visibility:private"],
  12. )
  13. filegroup(
  14. name = "all-srcs",
  15. srcs = [":package-srcs"],
  16. tags = ["automanaged"],
  17. )
  18. go_library(
  19. name = "go_default_library",
  20. srcs = [
  21. "mysql.go",
  22. "sql.go",
  23. ],
  24. importpath = "go-common/library/database/sql",
  25. tags = ["automanaged"],
  26. deps = [
  27. "//library/ecode:go_default_library",
  28. "//library/log:go_default_library",
  29. "//library/net/netutil/breaker:go_default_library",
  30. "//library/net/trace:go_default_library",
  31. "//library/stat:go_default_library",
  32. "//library/time:go_default_library",
  33. "//vendor/github.com/go-sql-driver/mysql:go_default_library",
  34. "//vendor/github.com/pkg/errors:go_default_library",
  35. ],
  36. )
  37. go_test(
  38. name = "go_default_test",
  39. srcs = ["mysql_test.go"],
  40. embed = [":go_default_library"],
  41. rundir = ".",
  42. tags = ["automanaged"],
  43. deps = [
  44. "//library/net/netutil/breaker:go_default_library",
  45. "//library/time:go_default_library",
  46. ],
  47. )