diff --git a/Makefile b/Makefile index 8bfb0e46148..6f640655a88 100644 --- a/Makefile +++ b/Makefile @@ -8,35 +8,35 @@ GO_PROTOBUF_REPO=github.com/golang/protobuf GO_PLUGIN_PKG=$(GO_PROTOBUF_REPO)/protoc-gen-go GO_PTYPES_ANY_PKG=$(GO_PROTOBUF_REPO)/ptypes/any SWAGGER_PLUGIN=bin/protoc-gen-swagger -SWAGGER_PLUGIN_SRC= utilities/doc.go \ - utilities/pattern.go \ - utilities/trie.go \ - protoc-gen-swagger/genswagger/generator.go \ - protoc-gen-swagger/genswagger/template.go \ +SWAGGER_PLUGIN_SRC= ./internal/utilities/doc.go \ + ./internal/utilities/pattern.go \ + ./internal/utilities/trie.go \ + protoc-gen-swagger/internal/genswagger/generator.go \ + protoc-gen-swagger/internal/genswagger/template.go \ protoc-gen-swagger/main.go SWAGGER_PLUGIN_PKG=./protoc-gen-swagger GATEWAY_PLUGIN=bin/protoc-gen-grpc-gateway GATEWAY_PLUGIN_PKG=./protoc-gen-grpc-gateway -GATEWAY_PLUGIN_SRC= utilities/doc.go \ - utilities/pattern.go \ - utilities/trie.go \ +GATEWAY_PLUGIN_SRC= ./internal/utilities/doc.go \ + ./internal/utilities/pattern.go \ + ./internal/utilities/trie.go \ + ./internal/descriptor \ + ./internal/descriptor/registry.go \ + ./internal/descriptor/services.go \ + ./internal/descriptor/types.go \ + ./internal/descriptor/grpc_api_configuration.go \ + ./internal/descriptor/grpc_api_service.go \ + ./internal/generator \ + ./internal/generator/generator.go \ protoc-gen-grpc-gateway \ - protoc-gen-grpc-gateway/descriptor \ - protoc-gen-grpc-gateway/descriptor/registry.go \ - protoc-gen-grpc-gateway/descriptor/services.go \ - protoc-gen-grpc-gateway/descriptor/types.go \ - protoc-gen-grpc-gateway/descriptor/grpc_api_configuration.go \ - protoc-gen-grpc-gateway/descriptor/grpc_api_service.go \ - protoc-gen-grpc-gateway/generator \ - protoc-gen-grpc-gateway/generator/generator.go \ protoc-gen-grpc-gateway/internal/gengateway \ protoc-gen-grpc-gateway/internal/gengateway/doc.go \ protoc-gen-grpc-gateway/internal/gengateway/generator.go \ protoc-gen-grpc-gateway/internal/gengateway/template.go \ - protoc-gen-grpc-gateway/httprule \ - protoc-gen-grpc-gateway/httprule/compile.go \ - protoc-gen-grpc-gateway/httprule/parse.go \ - protoc-gen-grpc-gateway/httprule/types.go \ + internal/httprule \ + internal/httprule/compile.go \ + internal/httprule/parse.go \ + internal/httprule/types.go \ protoc-gen-grpc-gateway/main.go GATEWAY_PLUGIN_FLAGS?= SWAGGER_PLUGIN_FLAGS?= @@ -234,11 +234,11 @@ changelog: --future-release=v1.14.4 lint: golint --set_exit_status ./runtime - golint --set_exit_status ./utilities/... + golint --set_exit_status ././internal/utilities/... golint --set_exit_status ./protoc-gen-grpc-gateway/... golint --set_exit_status ./protoc-gen-swagger/... go vet ./runtime || true - go vet ./utilities/... + go vet ././internal/utilities/... go vet ./protoc-gen-grpc-gateway/... go vet ./protoc-gen-swagger/... diff --git a/examples/internal/helloworld/BUILD.bazel b/examples/internal/helloworld/BUILD.bazel index c389c3b0a98..0ae7affc43e 100644 --- a/examples/internal/helloworld/BUILD.bazel +++ b/examples/internal/helloworld/BUILD.bazel @@ -28,8 +28,8 @@ go_library( importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld", visibility = ["//visibility:public"], deps = [ + "//internal/utilities:go_default_library", "//runtime:go_default_library", - "//utilities:go_default_library", "@com_github_golang_protobuf//descriptor:go_default_library_gen", "@com_github_golang_protobuf//proto:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/examples/internal/helloworld/helloworld.pb.gw.go b/examples/internal/helloworld/helloworld.pb.gw.go index 95610308f77..1b3f5f3fe96 100644 --- a/examples/internal/helloworld/helloworld.pb.gw.go +++ b/examples/internal/helloworld/helloworld.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/BUILD.bazel b/examples/internal/proto/examplepb/BUILD.bazel index 199454cbb06..ad808e9525c 100644 --- a/examples/internal/proto/examplepb/BUILD.bazel +++ b/examples/internal/proto/examplepb/BUILD.bazel @@ -76,8 +76,8 @@ go_library( embed = [":examplepb_go_proto"], importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb", deps = [ + "//internal/utilities:go_default_library", "//runtime:go_default_library", - "//utilities:go_default_library", "@com_github_golang_protobuf//descriptor:go_default_library_gen", "@com_github_golang_protobuf//proto:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go index 1411db2c963..e3323be04c8 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go @@ -19,8 +19,8 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum" "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub" "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/echo_service.pb.gw.go b/examples/internal/proto/examplepb/echo_service.pb.gw.go index d467c0d4986..f8565564d5a 100644 --- a/examples/internal/proto/examplepb/echo_service.pb.gw.go +++ b/examples/internal/proto/examplepb/echo_service.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/flow_combination.pb.gw.go b/examples/internal/proto/examplepb/flow_combination.pb.gw.go index c876352a770..728b3207211 100644 --- a/examples/internal/proto/examplepb/flow_combination.pb.gw.go +++ b/examples/internal/proto/examplepb/flow_combination.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/non_standard_names.pb.gw.go b/examples/internal/proto/examplepb/non_standard_names.pb.gw.go index 8db9cd2524f..47f52be92a0 100644 --- a/examples/internal/proto/examplepb/non_standard_names.pb.gw.go +++ b/examples/internal/proto/examplepb/non_standard_names.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/response_body_service.pb.gw.go b/examples/internal/proto/examplepb/response_body_service.pb.gw.go index 6da76968937..52480625cad 100644 --- a/examples/internal/proto/examplepb/response_body_service.pb.gw.go +++ b/examples/internal/proto/examplepb/response_body_service.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/stream.pb.gw.go b/examples/internal/proto/examplepb/stream.pb.gw.go index 26b49643961..66500a5818c 100644 --- a/examples/internal/proto/examplepb/stream.pb.gw.go +++ b/examples/internal/proto/examplepb/stream.pb.gw.go @@ -17,8 +17,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go b/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go index 929fa6a3199..770c4f6e8da 100644 --- a/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go +++ b/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/use_go_template.pb.gw.go b/examples/internal/proto/examplepb/use_go_template.pb.gw.go index dc561fb2d27..cda68521f19 100644 --- a/examples/internal/proto/examplepb/use_go_template.pb.gw.go +++ b/examples/internal/proto/examplepb/use_go_template.pb.gw.go @@ -15,8 +15,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/examplepb/wrappers.pb.gw.go b/examples/internal/proto/examplepb/wrappers.pb.gw.go index 7aa1045b625..722174ae3f8 100644 --- a/examples/internal/proto/examplepb/wrappers.pb.gw.go +++ b/examples/internal/proto/examplepb/wrappers.pb.gw.go @@ -17,8 +17,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/wrappers" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/examples/internal/proto/standalone/BUILD.bazel b/examples/internal/proto/standalone/BUILD.bazel index a5c303f02e7..e1dbc0835fa 100644 --- a/examples/internal/proto/standalone/BUILD.bazel +++ b/examples/internal/proto/standalone/BUILD.bazel @@ -7,8 +7,8 @@ go_library( visibility = ["//examples:__subpackages__"], deps = [ "//examples/internal/proto/examplepb:go_default_library", + "//internal/utilities:go_default_library", "//runtime:go_default_library", - "//utilities:go_default_library", "@com_github_golang_protobuf//descriptor:go_default_library_gen", "@com_github_golang_protobuf//proto:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go b/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go index acd19da52f7..34d5d39c073 100644 --- a/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go +++ b/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go @@ -16,8 +16,8 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" extExamplepb "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/fuzzit.sh b/fuzzit.sh index e5df5f3f843..43c0f23918b 100755 --- a/fuzzit.sh +++ b/fuzzit.sh @@ -9,9 +9,9 @@ cd go-fuzz go get ./... go build ./... -#go get -v -u ./protoc-gen-grpc-gateway/httprule +#go get -v -u ./internal/httprule cd /src/grpc-gateway -go-fuzz-build -libfuzzer -o parse-http-rule.a ./protoc-gen-grpc-gateway/httprule +go-fuzz-build -libfuzzer -o parse-http-rule.a ./internal/httprule clang-9 -fsanitize=fuzzer parse-http-rule.a -o parse-http-rule wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.29/fuzzit_Linux_x86_64 diff --git a/codegenerator/BUILD.bazel b/internal/codegenerator/BUILD.bazel similarity index 90% rename from codegenerator/BUILD.bazel rename to internal/codegenerator/BUILD.bazel index df1beb39ab7..9d0aa3741f1 100644 --- a/codegenerator/BUILD.bazel +++ b/internal/codegenerator/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "doc.go", "parse_req.go", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/codegenerator", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator", deps = [ "@com_github_golang_protobuf//proto:go_default_library", "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", diff --git a/codegenerator/doc.go b/internal/codegenerator/doc.go similarity index 100% rename from codegenerator/doc.go rename to internal/codegenerator/doc.go diff --git a/codegenerator/parse_req.go b/internal/codegenerator/parse_req.go similarity index 100% rename from codegenerator/parse_req.go rename to internal/codegenerator/parse_req.go diff --git a/codegenerator/parse_req_test.go b/internal/codegenerator/parse_req_test.go similarity index 95% rename from codegenerator/parse_req_test.go rename to internal/codegenerator/parse_req_test.go index a75b64a4771..c2eb9e757ed 100644 --- a/codegenerator/parse_req_test.go +++ b/internal/codegenerator/parse_req_test.go @@ -11,7 +11,7 @@ import ( "github.com/golang/protobuf/proto" plugin "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/google/go-cmp/cmp" - "github.com/grpc-ecosystem/grpc-gateway/v2/codegenerator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator" "google.golang.org/protobuf/testing/protocmp" ) diff --git a/protoc-gen-grpc-gateway/descriptor/BUILD.bazel b/internal/descriptor/BUILD.bazel similarity index 85% rename from protoc-gen-grpc-gateway/descriptor/BUILD.bazel rename to internal/descriptor/BUILD.bazel index 433ce26bb4e..aab8c6527a7 100644 --- a/protoc-gen-grpc-gateway/descriptor/BUILD.bazel +++ b/internal/descriptor/BUILD.bazel @@ -11,9 +11,9 @@ go_library( "services.go", "types.go", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor", deps = [ - "//protoc-gen-grpc-gateway/httprule:go_default_library", + "//internal/httprule:go_default_library", "@com_github_ghodss_yaml//:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//jsonpb:go_default_library_gen", @@ -36,7 +36,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//protoc-gen-grpc-gateway/httprule:go_default_library", + "//internal/httprule:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", diff --git a/protoc-gen-grpc-gateway/descriptor/grpc_api_configuration.go b/internal/descriptor/grpc_api_configuration.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/grpc_api_configuration.go rename to internal/descriptor/grpc_api_configuration.go diff --git a/protoc-gen-grpc-gateway/descriptor/grpc_api_configuration_test.go b/internal/descriptor/grpc_api_configuration_test.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/grpc_api_configuration_test.go rename to internal/descriptor/grpc_api_configuration_test.go diff --git a/protoc-gen-grpc-gateway/descriptor/grpc_api_service.go b/internal/descriptor/grpc_api_service.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/grpc_api_service.go rename to internal/descriptor/grpc_api_service.go diff --git a/protoc-gen-grpc-gateway/descriptor/registry.go b/internal/descriptor/registry.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/registry.go rename to internal/descriptor/registry.go diff --git a/protoc-gen-grpc-gateway/descriptor/registry_test.go b/internal/descriptor/registry_test.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/registry_test.go rename to internal/descriptor/registry_test.go diff --git a/protoc-gen-grpc-gateway/descriptor/services.go b/internal/descriptor/services.go similarity index 99% rename from protoc-gen-grpc-gateway/descriptor/services.go rename to internal/descriptor/services.go index 1e7e4a58f1a..b85e6d47922 100644 --- a/protoc-gen-grpc-gateway/descriptor/services.go +++ b/internal/descriptor/services.go @@ -7,7 +7,7 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/proto" descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" options "google.golang.org/genproto/googleapis/api/annotations" ) diff --git a/protoc-gen-grpc-gateway/descriptor/services_test.go b/internal/descriptor/services_test.go similarity index 99% rename from protoc-gen-grpc-gateway/descriptor/services_test.go rename to internal/descriptor/services_test.go index 18915aba853..bc984aae966 100644 --- a/protoc-gen-grpc-gateway/descriptor/services_test.go +++ b/internal/descriptor/services_test.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/proto" descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" ) func compilePath(t *testing.T, path string) httprule.Template { diff --git a/protoc-gen-grpc-gateway/descriptor/types.go b/internal/descriptor/types.go similarity index 99% rename from protoc-gen-grpc-gateway/descriptor/types.go rename to internal/descriptor/types.go index a0676e55965..c7c1baa2316 100644 --- a/protoc-gen-grpc-gateway/descriptor/types.go +++ b/internal/descriptor/types.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/protoc-gen-go/descriptor" gogen "github.com/golang/protobuf/protoc-gen-go/generator" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" ) // IsWellKnownType returns true if the provided fully qualified type name is considered 'well-known'. diff --git a/protoc-gen-grpc-gateway/descriptor/types_test.go b/internal/descriptor/types_test.go similarity index 100% rename from protoc-gen-grpc-gateway/descriptor/types_test.go rename to internal/descriptor/types_test.go diff --git a/protoc-gen-grpc-gateway/generator/BUILD.bazel b/internal/generator/BUILD.bazel similarity index 62% rename from protoc-gen-grpc-gateway/generator/BUILD.bazel rename to internal/generator/BUILD.bazel index 4c6864ab0e7..d1d3c9a0281 100644 --- a/protoc-gen-grpc-gateway/generator/BUILD.bazel +++ b/internal/generator/BUILD.bazel @@ -5,9 +5,9 @@ package(default_visibility = ["//visibility:public"]) go_library( name = "go_default_library", srcs = ["generator.go"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/generator", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator", deps = [ - "//protoc-gen-grpc-gateway/descriptor:go_default_library", + "//internal/descriptor:go_default_library", "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", ], ) diff --git a/protoc-gen-grpc-gateway/generator/generator.go b/internal/generator/generator.go similarity index 82% rename from protoc-gen-grpc-gateway/generator/generator.go rename to internal/generator/generator.go index c927ec692fc..21255eaa95b 100644 --- a/protoc-gen-grpc-gateway/generator/generator.go +++ b/internal/generator/generator.go @@ -3,7 +3,7 @@ package generator import ( plugin "github.com/golang/protobuf/protoc-gen-go/plugin" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" ) // Generator is an abstraction of code generators. diff --git a/protoc-gen-grpc-gateway/httprule/BUILD.bazel b/internal/httprule/BUILD.bazel similarity index 76% rename from protoc-gen-grpc-gateway/httprule/BUILD.bazel rename to internal/httprule/BUILD.bazel index df87e3bd87c..5fda2f0a60a 100644 --- a/protoc-gen-grpc-gateway/httprule/BUILD.bazel +++ b/internal/httprule/BUILD.bazel @@ -9,9 +9,9 @@ go_library( "parse.go", "types.go", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule", deps = [ - "//utilities:go_default_library", + "//internal/utilities:go_default_library", "@com_github_golang_glog//:go_default_library", ], ) @@ -26,7 +26,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//utilities:go_default_library", + "//internal/utilities:go_default_library", "@com_github_golang_glog//:go_default_library", ], ) diff --git a/protoc-gen-grpc-gateway/httprule/compile.go b/internal/httprule/compile.go similarity index 97% rename from protoc-gen-grpc-gateway/httprule/compile.go rename to internal/httprule/compile.go index 162319d3f3b..1a4a9ed1e53 100644 --- a/protoc-gen-grpc-gateway/httprule/compile.go +++ b/internal/httprule/compile.go @@ -1,7 +1,7 @@ package httprule import ( - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" ) const ( diff --git a/protoc-gen-grpc-gateway/httprule/compile_test.go b/internal/httprule/compile_test.go similarity index 97% rename from protoc-gen-grpc-gateway/httprule/compile_test.go rename to internal/httprule/compile_test.go index 2996b99e613..6ab50edac84 100644 --- a/protoc-gen-grpc-gateway/httprule/compile_test.go +++ b/internal/httprule/compile_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" ) const ( diff --git a/protoc-gen-grpc-gateway/httprule/fuzz.go b/internal/httprule/fuzz.go similarity index 100% rename from protoc-gen-grpc-gateway/httprule/fuzz.go rename to internal/httprule/fuzz.go diff --git a/protoc-gen-grpc-gateway/httprule/parse.go b/internal/httprule/parse.go similarity index 100% rename from protoc-gen-grpc-gateway/httprule/parse.go rename to internal/httprule/parse.go diff --git a/protoc-gen-grpc-gateway/httprule/parse_test.go b/internal/httprule/parse_test.go similarity index 100% rename from protoc-gen-grpc-gateway/httprule/parse_test.go rename to internal/httprule/parse_test.go diff --git a/protoc-gen-grpc-gateway/httprule/types.go b/internal/httprule/types.go similarity index 100% rename from protoc-gen-grpc-gateway/httprule/types.go rename to internal/httprule/types.go diff --git a/protoc-gen-grpc-gateway/httprule/types_test.go b/internal/httprule/types_test.go similarity index 100% rename from protoc-gen-grpc-gateway/httprule/types_test.go rename to internal/httprule/types_test.go diff --git a/utilities/BUILD.bazel b/internal/utilities/BUILD.bazel similarity index 83% rename from utilities/BUILD.bazel rename to internal/utilities/BUILD.bazel index 6bb7df467fb..1a6d50e339a 100644 --- a/utilities/BUILD.bazel +++ b/internal/utilities/BUILD.bazel @@ -10,7 +10,7 @@ go_library( "readerfactory.go", "trie.go", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/utilities", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities", ) go_test( diff --git a/utilities/doc.go b/internal/utilities/doc.go similarity index 100% rename from utilities/doc.go rename to internal/utilities/doc.go diff --git a/utilities/pattern.go b/internal/utilities/pattern.go similarity index 100% rename from utilities/pattern.go rename to internal/utilities/pattern.go diff --git a/utilities/readerfactory.go b/internal/utilities/readerfactory.go similarity index 100% rename from utilities/readerfactory.go rename to internal/utilities/readerfactory.go diff --git a/utilities/trie.go b/internal/utilities/trie.go similarity index 100% rename from utilities/trie.go rename to internal/utilities/trie.go diff --git a/utilities/trie_test.go b/internal/utilities/trie_test.go similarity index 99% rename from utilities/trie_test.go rename to internal/utilities/trie_test.go index 615aafb2458..4e219e1b0ed 100644 --- a/utilities/trie_test.go +++ b/internal/utilities/trie_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" ) func TestMaxCommonPrefix(t *testing.T) { diff --git a/protoc-gen-grpc-gateway/BUILD.bazel b/protoc-gen-grpc-gateway/BUILD.bazel index e39d75d3844..09851518641 100644 --- a/protoc-gen-grpc-gateway/BUILD.bazel +++ b/protoc-gen-grpc-gateway/BUILD.bazel @@ -8,8 +8,8 @@ go_library( srcs = ["main.go"], importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway", deps = [ - "//codegenerator:go_default_library", - "//protoc-gen-grpc-gateway/descriptor:go_default_library", + "//internal/codegenerator:go_default_library", + "//internal/descriptor:go_default_library", "//protoc-gen-grpc-gateway/internal/gengateway:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", @@ -33,8 +33,8 @@ go_proto_compiler( suffix = ".pb.gw.go", visibility = ["//visibility:public"], deps = [ + "//internal/utilities:go_default_library", "//runtime:go_default_library", - "//utilities:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", diff --git a/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel b/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel index 3c5d722ca87..94f59180769 100644 --- a/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel +++ b/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel @@ -11,9 +11,9 @@ go_library( ], importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/internal/gengateway", deps = [ - "//protoc-gen-grpc-gateway/descriptor:go_default_library", - "//protoc-gen-grpc-gateway/generator:go_default_library", - "//utilities:go_default_library", + "//internal/descriptor:go_default_library", + "//internal/generator:go_default_library", + "//internal/utilities:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_golang_protobuf//protoc-gen-go/generator:go_default_library_gen", @@ -30,8 +30,8 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//protoc-gen-grpc-gateway/descriptor:go_default_library", - "//protoc-gen-grpc-gateway/httprule:go_default_library", + "//internal/descriptor:go_default_library", + "//internal/httprule:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", ], diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator.go b/protoc-gen-grpc-gateway/internal/gengateway/generator.go index 44f1e6e9507..16d2513a557 100644 --- a/protoc-gen-grpc-gateway/internal/gengateway/generator.go +++ b/protoc-gen-grpc-gateway/internal/gengateway/generator.go @@ -11,8 +11,8 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/proto" plugin "github.com/golang/protobuf/protoc-gen-go/plugin" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - gen "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/generator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator" ) var ( @@ -45,7 +45,7 @@ func New(reg *descriptor.Registry, useRequestContext bool, registerFuncSuffix, p "io", "net/http", "github.com/grpc-ecosystem/grpc-gateway/v2/runtime", - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities", + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities", "github.com/golang/protobuf/descriptor", "github.com/golang/protobuf/proto", "google.golang.org/grpc", diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go index d54bd03e399..0d36ff9af19 100644 --- a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go +++ b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go @@ -7,7 +7,7 @@ import ( "github.com/golang/protobuf/proto" protodescriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" ) func newExampleFileDescriptor() *descriptor.File { diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template.go b/protoc-gen-grpc-gateway/internal/gengateway/template.go index beb7475cfd5..4b6614e9fc6 100644 --- a/protoc-gen-grpc-gateway/internal/gengateway/template.go +++ b/protoc-gen-grpc-gateway/internal/gengateway/template.go @@ -9,8 +9,8 @@ import ( "github.com/golang/glog" generator2 "github.com/golang/protobuf/protoc-gen-go/generator" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" ) type param struct { diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template_test.go b/protoc-gen-grpc-gateway/internal/gengateway/template_test.go index 8c07e83b4a4..281fe93690b 100644 --- a/protoc-gen-grpc-gateway/internal/gengateway/template_test.go +++ b/protoc-gen-grpc-gateway/internal/gengateway/template_test.go @@ -6,8 +6,8 @@ import ( "github.com/golang/protobuf/proto" protodescriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" ) func crossLinkFixture(f *descriptor.File) *descriptor.File { diff --git a/protoc-gen-grpc-gateway/main.go b/protoc-gen-grpc-gateway/main.go index dfa392d6193..5d7a4018410 100644 --- a/protoc-gen-grpc-gateway/main.go +++ b/protoc-gen-grpc-gateway/main.go @@ -17,8 +17,8 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/proto" plugin "github.com/golang/protobuf/protoc-gen-go/plugin" - "github.com/grpc-ecosystem/grpc-gateway/v2/codegenerator" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/internal/gengateway" ) diff --git a/protoc-gen-swagger/BUILD.bazel b/protoc-gen-swagger/BUILD.bazel index 2b5b97efbb8..f6f93625f2e 100644 --- a/protoc-gen-swagger/BUILD.bazel +++ b/protoc-gen-swagger/BUILD.bazel @@ -7,9 +7,9 @@ go_library( srcs = ["main.go"], importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger", deps = [ - "//codegenerator:go_default_library", - "//protoc-gen-grpc-gateway/descriptor:go_default_library", - "//protoc-gen-swagger/genswagger:go_default_library", + "//internal/codegenerator:go_default_library", + "//internal/descriptor:go_default_library", + "//protoc-gen-swagger/internal/genswagger:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", diff --git a/protoc-gen-swagger/genswagger/BUILD.bazel b/protoc-gen-swagger/internal/genswagger/BUILD.bazel similarity index 84% rename from protoc-gen-swagger/genswagger/BUILD.bazel rename to protoc-gen-swagger/internal/genswagger/BUILD.bazel index e2b2e447a8b..f4b1cdda53f 100644 --- a/protoc-gen-swagger/genswagger/BUILD.bazel +++ b/protoc-gen-swagger/internal/genswagger/BUILD.bazel @@ -12,11 +12,11 @@ go_library( "template.go", "types.go", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/genswagger", + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/internal/genswagger", deps = [ "//internal:go_default_library", - "//protoc-gen-grpc-gateway/descriptor:go_default_library", - "//protoc-gen-grpc-gateway/generator:go_default_library", + "//internal/descriptor:go_default_library", + "//internal/generator:go_default_library", "//protoc-gen-swagger/options:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//descriptor:go_default_library_gen", @@ -36,8 +36,8 @@ go_test( srcs = ["template_test.go"], embed = [":go_default_library"], deps = [ - "//protoc-gen-grpc-gateway/descriptor:go_default_library", - "//protoc-gen-grpc-gateway/httprule:go_default_library", + "//internal/descriptor:go_default_library", + "//internal/httprule:go_default_library", "//protoc-gen-swagger/options:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@io_bazel_rules_go//proto/wkt:any_go_proto", diff --git a/protoc-gen-swagger/genswagger/doc.go b/protoc-gen-swagger/internal/genswagger/doc.go similarity index 100% rename from protoc-gen-swagger/genswagger/doc.go rename to protoc-gen-swagger/internal/genswagger/doc.go diff --git a/protoc-gen-swagger/genswagger/generator.go b/protoc-gen-swagger/internal/genswagger/generator.go similarity index 97% rename from protoc-gen-swagger/genswagger/generator.go rename to protoc-gen-swagger/internal/genswagger/generator.go index bb1fc5ae391..4d9610578cf 100644 --- a/protoc-gen-swagger/genswagger/generator.go +++ b/protoc-gen-swagger/internal/genswagger/generator.go @@ -16,8 +16,8 @@ import ( plugin "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/golang/protobuf/ptypes/any" "github.com/grpc-ecosystem/grpc-gateway/v2/internal" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - gen "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/generator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator" swagger_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/options" spb "google.golang.org/genproto/googleapis/rpc/status" ) diff --git a/protoc-gen-swagger/genswagger/helpers.go b/protoc-gen-swagger/internal/genswagger/helpers.go similarity index 100% rename from protoc-gen-swagger/genswagger/helpers.go rename to protoc-gen-swagger/internal/genswagger/helpers.go diff --git a/protoc-gen-swagger/genswagger/helpers_go111_old.go b/protoc-gen-swagger/internal/genswagger/helpers_go111_old.go similarity index 100% rename from protoc-gen-swagger/genswagger/helpers_go111_old.go rename to protoc-gen-swagger/internal/genswagger/helpers_go111_old.go diff --git a/protoc-gen-swagger/genswagger/template.go b/protoc-gen-swagger/internal/genswagger/template.go similarity index 99% rename from protoc-gen-swagger/genswagger/template.go rename to protoc-gen-swagger/internal/genswagger/template.go index 712c2e0657d..39e44bf01bc 100644 --- a/protoc-gen-swagger/genswagger/template.go +++ b/protoc-gen-swagger/internal/genswagger/template.go @@ -19,7 +19,7 @@ import ( "github.com/golang/protobuf/proto" pbdescriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" structpb "github.com/golang/protobuf/ptypes/struct" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" swagger_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/options" ) diff --git a/protoc-gen-swagger/genswagger/template_test.go b/protoc-gen-swagger/internal/genswagger/template_test.go similarity index 99% rename from protoc-gen-swagger/genswagger/template_test.go rename to protoc-gen-swagger/internal/genswagger/template_test.go index 3636abf2b65..5c65ed52972 100644 --- a/protoc-gen-swagger/genswagger/template_test.go +++ b/protoc-gen-swagger/internal/genswagger/template_test.go @@ -13,8 +13,8 @@ import ( plugin "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/golang/protobuf/ptypes/any" structpb "github.com/golang/protobuf/ptypes/struct" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/httprule" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" swagger_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/options" ) diff --git a/protoc-gen-swagger/genswagger/types.go b/protoc-gen-swagger/internal/genswagger/types.go similarity index 99% rename from protoc-gen-swagger/genswagger/types.go rename to protoc-gen-swagger/internal/genswagger/types.go index e561083d7a2..b0cd58ac758 100644 --- a/protoc-gen-swagger/genswagger/types.go +++ b/protoc-gen-swagger/internal/genswagger/types.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" ) type param struct { diff --git a/protoc-gen-swagger/main.go b/protoc-gen-swagger/main.go index 2d6c8da6c9f..d44999a9ee0 100644 --- a/protoc-gen-swagger/main.go +++ b/protoc-gen-swagger/main.go @@ -9,9 +9,9 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/proto" plugin "github.com/golang/protobuf/protoc-gen-go/plugin" - "github.com/grpc-ecosystem/grpc-gateway/v2/codegenerator" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/genswagger" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-swagger/internal/genswagger" ) var ( diff --git a/runtime/BUILD.bazel b/runtime/BUILD.bazel index 2e47dabb126..3f0c0395b9a 100644 --- a/runtime/BUILD.bazel +++ b/runtime/BUILD.bazel @@ -26,7 +26,7 @@ go_library( importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime", deps = [ "//internal:go_default_library", - "//utilities:go_default_library", + "//internal/utilities:go_default_library", "@com_github_golang_protobuf//descriptor:go_default_library_gen", "@com_github_golang_protobuf//jsonpb:go_default_library_gen", "@com_github_golang_protobuf//proto:go_default_library", @@ -65,8 +65,8 @@ go_test( embed = [":go_default_library"], deps = [ "//internal:go_default_library", + "//internal/utilities:go_default_library", "//runtime/internal/examplepb:go_default_library", - "//utilities:go_default_library", "@com_github_golang_protobuf//jsonpb:go_default_library_gen", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_golang_protobuf//ptypes:go_default_library_gen", diff --git a/runtime/mux_test.go b/runtime/mux_test.go index 0672f271e22..21ea5d143f5 100644 --- a/runtime/mux_test.go +++ b/runtime/mux_test.go @@ -8,8 +8,8 @@ import ( "net/http/httptest" "testing" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/runtime/pattern.go b/runtime/pattern.go index a717ef6f1c2..c2e4bf956b0 100644 --- a/runtime/pattern.go +++ b/runtime/pattern.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "google.golang.org/grpc/grpclog" ) diff --git a/runtime/pattern_test.go b/runtime/pattern_test.go index 1b856a512a4..6b7e8fc4ecc 100644 --- a/runtime/pattern_test.go +++ b/runtime/pattern_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" ) const ( diff --git a/runtime/query.go b/runtime/query.go index 13e563cf909..b7e00548a76 100644 --- a/runtime/query.go +++ b/runtime/query.go @@ -11,7 +11,7 @@ import ( "time" "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "google.golang.org/grpc/grpclog" ) diff --git a/runtime/query_test.go b/runtime/query_test.go index 33b6ef06fa1..f1586fe0569 100644 --- a/runtime/query_test.go +++ b/runtime/query_test.go @@ -12,9 +12,9 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/wrappers" "github.com/google/go-cmp/cmp" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/genproto/protobuf/field_mask" "google.golang.org/protobuf/testing/protocmp" )