From 00fc89c95eac0c09af2f74101f45f221bb1bbc0f Mon Sep 17 00:00:00 2001 From: nametake Date: Wed, 5 Feb 2020 23:58:42 +0900 Subject: [PATCH 1/4] Added goreleaser config file --- .github/workflows/go.yaml | 22 +++++++++------------- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ .goreleaser.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index cb033bc..69ef08d 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -7,32 +7,28 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - name: Set up Go uses: actions/setup-go@v1 with: version: 1.13 - - name: Checkout uses: actions/checkout@master - - name: Setup protoc env: - PROTOC_VERSION: "3.5.1" - run: | - curl -fo protoc.zip -sSL "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" - mkdir protoc - unzip -q protoc.zip -d protoc - sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/ - sudo cp -a ./protoc/include/google /usr/local/include/ - rm protoc.zip protoc -rf - + PROTOC_VERSION: "3.7.1" + run: > + curl -fo protoc.zip -sSL + "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"; + mkdir protoc; + unzip -q protoc.zip -d protoc; + sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/; + sudo cp -a ./protoc/include/google /usr/local/include/; + rm protoc.zip protoc -rf; - name: Setup protoc-gen-go env: GO111MODULE: "off" run: | go get -u github.com/golang/protobuf/protoc-gen-go - - name: Test run: | export PATH=$PATH:$(go env GOPATH)/bin diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8d08b3f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +--- +name: release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: 1.13 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..d079b35 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,29 @@ +--- +project_name: protoc-gen-gohttp +env: + - GO111MODULE=on +before: + hooks: + - go mod tidy +builds: + - main: . + binary: protoc-gen-gohttp + ldflags: + - -s -w + - -X main.Version={{.Version}} + - -X main.Revision={{.ShortCommit}} + env: + - CGO_ENABLED=0 +archives: + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + replacements: + darwin: darwin + linux: linux + windows: windows + 386: i386 + amd64: x86_64 + format_overrides: + - goos: windows + format: zip +release: + prerelease: auto From ee681222f8ad0cbb88dc29600047ce081cd069fd Mon Sep 17 00:00:00 2001 From: nametake Date: Thu, 6 Feb 2020 00:02:35 +0900 Subject: [PATCH 2/4] Fixed test action --- .github/workflows/go.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 69ef08d..7381358 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -16,14 +16,14 @@ jobs: - name: Setup protoc env: PROTOC_VERSION: "3.7.1" - run: > - curl -fo protoc.zip -sSL - "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"; - mkdir protoc; - unzip -q protoc.zip -d protoc; - sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/; - sudo cp -a ./protoc/include/google /usr/local/include/; - rm protoc.zip protoc -rf; + run: | + curl -fo protoc.zip -sSL \ + "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" + mkdir protoc + unzip -q protoc.zip -d protoc + sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/ + sudo cp -a ./protoc/include/google /usr/local/include/ + rm protoc.zip protoc -rf - name: Setup protoc-gen-go env: GO111MODULE: "off" From e4e26f5548c806e6ccf144fa1aa6f759a58a65a1 Mon Sep 17 00:00:00 2001 From: nametake Date: Thu, 6 Feb 2020 00:05:06 +0900 Subject: [PATCH 3/4] Fixed test action --- .github/workflows/go.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 7381358..f04a245 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -16,14 +16,14 @@ jobs: - name: Setup protoc env: PROTOC_VERSION: "3.7.1" - run: | + run: > curl -fo protoc.zip -sSL \ - "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" - mkdir protoc - unzip -q protoc.zip -d protoc - sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/ - sudo cp -a ./protoc/include/google /usr/local/include/ - rm protoc.zip protoc -rf + "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"; + mkdir protoc; + unzip -q protoc.zip -d protoc; + sudo install -m 755 ./protoc/bin/protoc /usr/local/bin/; + sudo cp -a ./protoc/include/google /usr/local/include/; + rm protoc.zip protoc -rf; - name: Setup protoc-gen-go env: GO111MODULE: "off" From 9b0f9d82045c4ee795bee7d0a0115f8b4a7eff82 Mon Sep 17 00:00:00 2001 From: nametake Date: Thu, 6 Feb 2020 00:17:34 +0900 Subject: [PATCH 4/4] Updated libs --- Makefile | 4 +++ examples/all_pattern.pb.go | 8 ++--- examples/greeter.pb.go | 8 ++--- examples/httprule.pb.go | 8 ++--- go.mod | 10 +++--- go.sum | 33 +++++++++++++------ testdata/auth/auth.pb.go | 8 ++--- .../hellostreamingworld.pb.go | 8 ++--- testdata/helloworld/helloworld.pb.go | 8 ++--- testdata/httprule/all_pattern.pb.go | 8 ++--- testdata/httprule/httprule.pb.go | 8 ++--- testdata/routeguide/route_guide.pb.go | 8 ++--- 12 files changed, 68 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index 53fb2d7..49ba5dc 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ test_example: run_examples: @go run examples/main.go examples/greeter.pb.go examples/greeter.http.go +update_libs: + @go get -u github.com/golang/protobuf google.golang.org/grpc + @go mod tidy + curl_google_api: @curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto > examples/google/api/annotations.proto @curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto > examples/google/api/http.proto diff --git a/examples/all_pattern.pb.go b/examples/all_pattern.pb.go index db1e3aa..29b5f16 100644 --- a/examples/all_pattern.pb.go +++ b/examples/all_pattern.pb.go @@ -308,11 +308,11 @@ var fileDescriptor_de8ae7e6b985e167 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // AllPatternClient is the client API for AllPattern service. // @@ -322,10 +322,10 @@ type AllPatternClient interface { } type allPatternClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewAllPatternClient(cc *grpc.ClientConn) AllPatternClient { +func NewAllPatternClient(cc grpc.ClientConnInterface) AllPatternClient { return &allPatternClient{cc} } diff --git a/examples/greeter.pb.go b/examples/greeter.pb.go index 4b56333..a8299c7 100644 --- a/examples/greeter.pb.go +++ b/examples/greeter.pb.go @@ -125,11 +125,11 @@ var fileDescriptor_e585294ab3f34af5 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // GreeterClient is the client API for Greeter service. // @@ -139,10 +139,10 @@ type GreeterClient interface { } type greeterClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { +func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { return &greeterClient{cc} } diff --git a/examples/httprule.pb.go b/examples/httprule.pb.go index cbe1a73..1f6eb88 100644 --- a/examples/httprule.pb.go +++ b/examples/httprule.pb.go @@ -537,11 +537,11 @@ var fileDescriptor_9d0d5480baba1876 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // MessagingClient is the client API for Messaging service. // @@ -553,10 +553,10 @@ type MessagingClient interface { } type messagingClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewMessagingClient(cc *grpc.ClientConn) MessagingClient { +func NewMessagingClient(cc grpc.ClientConnInterface) MessagingClient { return &messagingClient{cc} } diff --git a/go.mod b/go.mod index a3f04f5..47ff41c 100644 --- a/go.mod +++ b/go.mod @@ -2,15 +2,15 @@ module github.com/nametake/protoc-gen-gohttp require ( github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/golang/protobuf v1.3.1 + github.com/golang/protobuf v1.3.3 github.com/google/go-cmp v0.3.0 github.com/pseudomuto/protokit v0.2.0 github.com/stretchr/testify v1.4.0 // indirect - golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5 - golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862 // indirect + golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect + golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect golang.org/x/text v0.3.2 // indirect - google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c - google.golang.org/grpc v1.20.1 + google.golang.org/genproto v0.0.0-20200205142000-a86caf926a67 + google.golang.org/grpc v1.27.0 ) go 1.13 diff --git a/go.sum b/go.sum index 3daefdd..d4a9d50 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,25 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -28,16 +34,17 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5 h1:6M3SDHlHHDCx2PcQw3S4KsR170vGqDhJDOmpVd4Hjak= -golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862 h1:rM0ROo5vb9AdYJi1110yjWGMej9ITfKddS89P3Fkhug= -golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -46,15 +53,21 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c h1:m9avZ3wyOWBR0fLC+qWbMBulk+Jiiqelngssgp8jfIs= -google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200205142000-a86caf926a67 h1:MBO9fkVSrTpJ8vgHLPi5gb+ZWXEy7/auJN8yqyu9EiE= +google.golang.org/genproto v0.0.0-20200205142000-a86caf926a67/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/testdata/auth/auth.pb.go b/testdata/auth/auth.pb.go index 8f52267..eeaee5e 100644 --- a/testdata/auth/auth.pb.go +++ b/testdata/auth/auth.pb.go @@ -145,11 +145,11 @@ var fileDescriptor_712ec48c1eaf43a2 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // TestServiceClient is the client API for TestService service. // @@ -159,10 +159,10 @@ type TestServiceClient interface { } type testServiceClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient { +func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { return &testServiceClient{cc} } diff --git a/testdata/hellostreamingworld/hellostreamingworld.pb.go b/testdata/hellostreamingworld/hellostreamingworld.pb.go index 77fbe78..e832ca1 100644 --- a/testdata/hellostreamingworld/hellostreamingworld.pb.go +++ b/testdata/hellostreamingworld/hellostreamingworld.pb.go @@ -138,11 +138,11 @@ var fileDescriptor_dbc0f6d3f1c21037 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // MultiGreeterClient is the client API for MultiGreeter service. // @@ -152,10 +152,10 @@ type MultiGreeterClient interface { } type multiGreeterClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewMultiGreeterClient(cc *grpc.ClientConn) MultiGreeterClient { +func NewMultiGreeterClient(cc grpc.ClientConnInterface) MultiGreeterClient { return &multiGreeterClient{cc} } diff --git a/testdata/helloworld/helloworld.pb.go b/testdata/helloworld/helloworld.pb.go index 801ce08..2abd688 100644 --- a/testdata/helloworld/helloworld.pb.go +++ b/testdata/helloworld/helloworld.pb.go @@ -125,11 +125,11 @@ var fileDescriptor_73149fedf49f4319 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // GreeterClient is the client API for Greeter service. // @@ -140,10 +140,10 @@ type GreeterClient interface { } type greeterClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { +func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { return &greeterClient{cc} } diff --git a/testdata/httprule/all_pattern.pb.go b/testdata/httprule/all_pattern.pb.go index a8b7996..3eddcd4 100644 --- a/testdata/httprule/all_pattern.pb.go +++ b/testdata/httprule/all_pattern.pb.go @@ -342,11 +342,11 @@ var fileDescriptor_5c72a0d5013ebec1 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // AllPatternClient is the client API for AllPattern service. // @@ -356,10 +356,10 @@ type AllPatternClient interface { } type allPatternClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewAllPatternClient(cc *grpc.ClientConn) AllPatternClient { +func NewAllPatternClient(cc grpc.ClientConnInterface) AllPatternClient { return &allPatternClient{cc} } diff --git a/testdata/httprule/httprule.pb.go b/testdata/httprule/httprule.pb.go index c2ffd1c..ab1ebee 100644 --- a/testdata/httprule/httprule.pb.go +++ b/testdata/httprule/httprule.pb.go @@ -340,11 +340,11 @@ var fileDescriptor_72d547f0661199d3 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // MessagingClient is the client API for Messaging service. // @@ -356,10 +356,10 @@ type MessagingClient interface { } type messagingClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewMessagingClient(cc *grpc.ClientConn) MessagingClient { +func NewMessagingClient(cc grpc.ClientConnInterface) MessagingClient { return &messagingClient{cc} } diff --git a/testdata/routeguide/route_guide.pb.go b/testdata/routeguide/route_guide.pb.go index 835887a..a6aa414 100644 --- a/testdata/routeguide/route_guide.pb.go +++ b/testdata/routeguide/route_guide.pb.go @@ -316,11 +316,11 @@ var fileDescriptor_d1dc806a642578ec = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // RouteGuideClient is the client API for RouteGuide service. // @@ -333,10 +333,10 @@ type RouteGuideClient interface { } type routeGuideClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewRouteGuideClient(cc *grpc.ClientConn) RouteGuideClient { +func NewRouteGuideClient(cc grpc.ClientConnInterface) RouteGuideClient { return &routeGuideClient{cc} }