BUILD.bazel 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. load("@io_bazel_rules_go//go:def.bzl", "go_library")
  2. go_library(
  3. name = "go_default_library",
  4. srcs = [
  5. "decoder.go",
  6. "errors.go",
  7. "mmap_unix.go",
  8. "mmap_windows.go",
  9. "reader.go",
  10. "reader_other.go",
  11. "traverse.go",
  12. "verifier.go",
  13. ],
  14. importmap = "go-common/vendor/github.com/oschwald/maxminddb-golang",
  15. importpath = "github.com/oschwald/maxminddb-golang",
  16. visibility = ["//visibility:public"],
  17. deps = select({
  18. "@io_bazel_rules_go//go/platform:android": [
  19. "//vendor/golang.org/x/sys/unix:go_default_library",
  20. ],
  21. "@io_bazel_rules_go//go/platform:darwin": [
  22. "//vendor/golang.org/x/sys/unix:go_default_library",
  23. ],
  24. "@io_bazel_rules_go//go/platform:dragonfly": [
  25. "//vendor/golang.org/x/sys/unix:go_default_library",
  26. ],
  27. "@io_bazel_rules_go//go/platform:freebsd": [
  28. "//vendor/golang.org/x/sys/unix:go_default_library",
  29. ],
  30. "@io_bazel_rules_go//go/platform:linux": [
  31. "//vendor/golang.org/x/sys/unix:go_default_library",
  32. ],
  33. "@io_bazel_rules_go//go/platform:nacl": [
  34. "//vendor/golang.org/x/sys/unix:go_default_library",
  35. ],
  36. "@io_bazel_rules_go//go/platform:netbsd": [
  37. "//vendor/golang.org/x/sys/unix:go_default_library",
  38. ],
  39. "@io_bazel_rules_go//go/platform:openbsd": [
  40. "//vendor/golang.org/x/sys/unix:go_default_library",
  41. ],
  42. "@io_bazel_rules_go//go/platform:plan9": [
  43. "//vendor/golang.org/x/sys/unix:go_default_library",
  44. ],
  45. "@io_bazel_rules_go//go/platform:solaris": [
  46. "//vendor/golang.org/x/sys/unix:go_default_library",
  47. ],
  48. "@io_bazel_rules_go//go/platform:windows": [
  49. "//vendor/golang.org/x/sys/windows:go_default_library",
  50. ],
  51. "//conditions:default": [],
  52. }),
  53. )
  54. filegroup(
  55. name = "package-srcs",
  56. srcs = glob(["**"]),
  57. tags = ["automanaged"],
  58. visibility = ["//visibility:private"],
  59. )
  60. filegroup(
  61. name = "all-srcs",
  62. srcs = [":package-srcs"],
  63. tags = ["automanaged"],
  64. visibility = ["//visibility:public"],
  65. )