diff --git a/BUILD.bazel b/BUILD.bazel index e41515b7..47da6c2e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,5 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") load("@bazel_gazelle//:def.bzl", "gazelle") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") # gazelle:prefix github.com/go-resty/resty/v2 # gazelle:go_naming_convention import_alias @@ -17,17 +17,19 @@ go_library( "resty.go", "retry.go", "trace.go", - "transport_js.go", - "transport_other.go", "transport.go", "transport112.go", + "transport_js.go", + "transport_other.go", "util.go", "util_curl.go", - "shellescape/shellescape.go" ], importpath = "github.com/go-resty/resty/v2", visibility = ["//visibility:public"], - deps = ["@org_golang_x_net//publicsuffix:go_default_library"], + deps = [ + "//shellescape", + "@org_golang_x_net//publicsuffix", + ], ) go_test( @@ -36,6 +38,7 @@ go_test( "client_test.go", "context_test.go", "example_test.go", + "middleware_test.go", "request_test.go", "resty_test.go", "retry_test.go", @@ -43,7 +46,10 @@ go_test( ], data = glob([".testdata/*"]), embed = [":resty"], - deps = ["@org_golang_x_net//proxy:go_default_library"], + deps = [ + "@org_golang_x_net//proxy", + "@org_golang_x_time//rate", + ], ) alias( diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel new file mode 100644 index 00000000..849ea4e6 --- /dev/null +++ b/examples/BUILD.bazel @@ -0,0 +1,10 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_test") + +go_test( + name = "examples_test", + srcs = [ + "debug_curl_test.go", + "server_test.go", + ], + deps = ["//:resty"], +) diff --git a/shellescape/BUILD.bazel b/shellescape/BUILD.bazel new file mode 100644 index 00000000..fe829e39 --- /dev/null +++ b/shellescape/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "shellescape", + srcs = ["shellescape.go"], + importpath = "github.com/go-resty/resty/v2/shellescape", + visibility = ["//visibility:public"], +) + +alias( + name = "go_default_library", + actual = ":shellescape", + visibility = ["//visibility:public"], +)