Skip to content

Commit

Permalink
utilities: move package to public API
Browse files Browse the repository at this point in the history
This was made internal, but it's actually used
by the generated files.
  • Loading branch information
johanbrandhorst committed May 25, 2020
1 parent cc95ab4 commit 877d598
Show file tree
Hide file tree
Showing 34 changed files with 39 additions and 39 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ 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
OPENAPI_PLUGIN=bin/protoc-gen-openapiv2
OPENAPI_PLUGIN_SRC= ./internal/utilities/doc.go \
./internal/utilities/pattern.go \
./internal/utilities/trie.go \
OPENAPI_PLUGIN_SRC= ./utilities/doc.go \
./utilities/pattern.go \
./utilities/trie.go \
protoc-gen-openapiv2/internal/genopenapi/generator.go \
protoc-gen-openapiv2/internal/genopenapi/template.go \
protoc-gen-openapiv2/main.go
OPENAPI_PLUGIN_PKG=./protoc-gen-openapiv2
GATEWAY_PLUGIN=bin/protoc-gen-grpc-gateway
GATEWAY_PLUGIN_PKG=./protoc-gen-grpc-gateway
GATEWAY_PLUGIN_SRC= ./internal/utilities/doc.go \
./internal/utilities/pattern.go \
./internal/utilities/trie.go \
GATEWAY_PLUGIN_SRC= ./utilities/doc.go \
./utilities/pattern.go \
./utilities/trie.go \
./internal/descriptor \
./internal/descriptor/registry.go \
./internal/descriptor/services.go \
Expand Down Expand Up @@ -232,11 +232,11 @@ changelog:
--future-release=v2.0.0-beta1
lint:
golint --set_exit_status ./runtime
golint --set_exit_status ./internal/utilities/...
golint --set_exit_status ./utilities/...
golint --set_exit_status ./protoc-gen-grpc-gateway/...
golint --set_exit_status ./protoc-gen-openapiv2/...
go vet ./runtime || true
go vet ./internal/utilities/...
go vet ./utilities/...
go vet ./protoc-gen-grpc-gateway/...
go vet ./protoc-gen-openapiv2/...

Expand Down
2 changes: 1 addition & 1 deletion examples/internal/helloworld/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion examples/internal/helloworld/helloworld.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/examplepb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,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",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/examplepb/echo_service.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/examplepb/stream.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/examplepb/use_go_template.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/examplepb/wrappers.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/internal/proto/standalone/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/httprule/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule",
deps = [
"//internal/utilities:go_default_library",
"//utilities:go_default_library",
"@com_github_golang_glog//:go_default_library",
],
)
Expand All @@ -26,7 +26,7 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//internal/utilities:go_default_library",
"//utilities:go_default_library",
"@com_github_golang_glog//:go_default_library",
],
)
2 changes: 1 addition & 1 deletion internal/httprule/compile.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package httprule

import (
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/httprule/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ go_library(
"//internal/casing:go_default_library",
"//internal/descriptor:go_default_library",
"//internal/generator:go_default_library",
"//internal/utilities:go_default_library",
"//utilities:go_default_library",
"@com_github_golang_glog//:go_default_library",
"@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
"@org_golang_google_protobuf//proto:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/internal/gengateway/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/internal/utilities",
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities",
"google.golang.org/protobuf/proto",
"google.golang.org/grpc",
"google.golang.org/grpc/codes",
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/internal/gengateway/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/golang/glog"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/casing"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
)

type param struct {
Expand Down
4 changes: 2 additions & 2 deletions runtime/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime",
deps = [
"//internal/utilities:go_default_library",
"//utilities:go_default_library",
"@com_github_golang_protobuf//ptypes:go_default_library_gen",
"@go_googleapis//google/api:httpbody_go_proto",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
Expand Down Expand Up @@ -62,8 +62,8 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//internal/utilities:go_default_library",
"//runtime/internal/examplepb:go_default_library",
"//utilities:go_default_library",
"@com_github_golang_protobuf//ptypes:go_default_library_gen",
"@com_github_google_go_cmp//cmp:go_default_library",
"@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion runtime/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strconv"
"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"
)

func TestMuxServeHTTP(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion runtime/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc/grpclog"
)

Expand Down
2 changes: 1 addition & 1 deletion runtime/pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion runtime/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/golang/protobuf/ptypes"
wrapperspb "github.com/golang/protobuf/ptypes/wrappers"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/grpc/grpclog"
"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion runtime/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/golang/protobuf/ptypes"
wrapperspb "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/proto"
"google.golang.org/protobuf/testing/protocmp"
Expand Down
2 changes: 1 addition & 1 deletion internal/utilities/BUILD.bazel → utilities/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go_library(
"readerfactory.go",
"trie.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities",
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/utilities",
)

go_test(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/utilities/trie_test.go → utilities/trie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/grpc-ecosystem/grpc-gateway/v2/internal/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
)

func TestMaxCommonPrefix(t *testing.T) {
Expand Down

0 comments on commit 877d598

Please sign in to comment.