BUILD 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. "dsn_test.go",
  11. "query_test.go",
  12. ],
  13. embed = [":go_default_library"],
  14. rundir = ".",
  15. tags = ["automanaged"],
  16. deps = ["//library/time:go_default_library"],
  17. )
  18. go_library(
  19. name = "go_default_library",
  20. srcs = [
  21. "doc.go",
  22. "dsn.go",
  23. "query.go",
  24. ],
  25. importpath = "go-common/library/conf/dsn",
  26. tags = ["automanaged"],
  27. visibility = ["//visibility:public"],
  28. deps = ["//vendor/gopkg.in/go-playground/validator.v9:go_default_library"],
  29. )
  30. filegroup(
  31. name = "package-srcs",
  32. srcs = glob(["**"]),
  33. tags = ["automanaged"],
  34. visibility = ["//visibility:private"],
  35. )
  36. filegroup(
  37. name = "all-srcs",
  38. srcs = [":package-srcs"],
  39. tags = ["automanaged"],
  40. visibility = ["//visibility:public"],
  41. )
  42. go_test(
  43. name = "go_default_xtest",
  44. srcs = ["example_test.go"],
  45. tags = ["automanaged"],
  46. deps = [
  47. "//library/conf/dsn:go_default_library",
  48. "//library/time:go_default_library",
  49. ],
  50. )