Skip to content

Commit c1d71cf

Browse files
Solve resty issue once and for all with sed magic
1 parent 8eb13b8 commit c1d71cf

File tree

15 files changed

+19
-25
lines changed

15 files changed

+19
-25
lines changed

.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- run: make realclean
4040
- run: make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}" # Set in Docker image
4141
- run: go mod tidy
42-
- run: go mod vendor
4342
- run: git diff --exit-code
4443
lint:
4544
docker:
@@ -65,8 +64,8 @@ jobs:
6564
EOF
6665
- run:
6766
name: Check that Bazel BUILD files are up-to-date
68-
command: 'test -z "$(bazel run //:gazelle_diff)" ||
69-
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle_fix\`" >&2; exit 1)'
67+
command: 'bazel run //:gazelle ||
68+
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle\`" >&2; exit 1)'
7069
- run:
7170
name: Run tests with Bazel
7271
command: bazel test //...

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env
2929
make realclean && \
3030
make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"'
3131
docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --rm \
32-
l.gcr.io/google/bazel -c 'bazel run :gazelle_fix; bazel run :buildifier'
32+
l.gcr.io/google/bazel -c 'bazel run :gazelle; bazel run :buildifier'
3333
```
3434

3535
If this has resulted in some file changes in the repo, please ensure you check those in with your merge request.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ $(RESPONSE_BODY_EXAMPLE_SRCS): $(RESPONSE_BODY_EXAMPLE_SPEC)
177177
$(EXAMPLE_CLIENT_DIR)/responsebody/git_push.sh
178178

179179
examples: $(EXAMPLE_DEPSRCS) $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_CLIENT_SRCS)
180+
find -type f -name *.go -exec sed -s -i 's;github.com/go-resty/resty;gopkg.in/resty.v1;g' {} +
180181
test: examples
181182
go test -race ...
182183
go test -race examples/integration -args -network=unix -endpoint=test.sock

WORKSPACE

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ go_rules_dependencies()
2121

2222
go_register_toolchains()
2323

24-
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
24+
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
2525

2626
gazelle_dependencies()
2727

28-
load("@bazel_gazelle//:deps.bzl", "go_repository")
29-
3028
# Also define in Gopkg.toml
3129
go_repository(
3230
name = "org_golang_google_genproto",
@@ -43,9 +41,9 @@ go_repository(
4341

4442
# Also define in Gopkg.toml
4543
go_repository(
46-
name = "com_github_go_resty_resty",
47-
commit = "f8815663de1e64d57cdd4ee9e2b2fa96977a030e",
48-
importpath = "github.com/go-resty/resty",
44+
name = "in_gopkg_resty_v1",
45+
commit = "fa5875c0caa5c260ab78acec5a244215a730247f",
46+
importpath = "gopkg.in/resty.v1",
4947
)
5048

5149
# Also define in Gopkg.toml

examples/clients/abe/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ go_library(
3030
"//examples/proto/examplepb:go_default_library",
3131
"//examples/proto/pathenum:go_default_library",
3232
"//runtime:go_default_library",
33-
"@com_github_go_resty_resty//:go_default_library",
33+
"@in_gopkg_resty_v1//:go_default_library",
3434
],
3535
)

examples/clients/abe/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/clients/echo/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ go_library(
1313
"examplepb_simple_message.go",
1414
],
1515
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/echo",
16-
deps = ["@com_github_go_resty_resty//:go_default_library"],
16+
deps = ["@in_gopkg_resty_v1//:go_default_library"],
1717
)

examples/clients/echo/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/clients/responsebody/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ go_library(
1919
],
2020
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/responsebody",
2121
visibility = ["//visibility:public"],
22-
deps = ["@com_github_go_resty_resty//:go_default_library"],
22+
deps = ["@in_gopkg_resty_v1//:go_default_library"],
2323
)

examples/clients/responsebody/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/clients/unannotatedecho/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ go_library(
1212
"unannotated_echo_service_api.go",
1313
],
1414
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/unannotatedecho",
15-
deps = ["@com_github_go_resty_resty//:go_default_library"],
15+
deps = ["@in_gopkg_resty_v1//:go_default_library"],
1616
)

examples/clients/unannotatedecho/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/proto/examplepb/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ go_library(
6666
"@org_golang_google_grpc//codes:go_default_library",
6767
"@org_golang_google_grpc//grpclog:go_default_library",
6868
"@org_golang_google_grpc//status:go_default_library",
69-
"@org_golang_x_net//context:go_default_library",
7069
],
7170
)
7271

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module github.com/grpc-ecosystem/grpc-gateway
22

33
require (
44
github.com/ghodss/yaml v1.0.0
5-
github.com/go-resty/resty v1.9.0
65
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
76
github.com/golang/protobuf v1.2.0
87
github.com/kr/pretty v0.1.0 // indirect
@@ -12,7 +11,6 @@ require (
1211
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
1312
google.golang.org/grpc v1.19.0
1413
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
14+
gopkg.in/resty.v1 v1.12.0
1515
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7 // indirect
1616
)
17-
18-
replace github.com/go-resty/resty => gopkg.in/resty.v1 v1.9.0

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
1616
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=
1717
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
1818
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
19-
golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
2019
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
2120
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
2221
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -36,8 +35,8 @@ google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8=
3635
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
3736
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
3837
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
39-
gopkg.in/resty.v1 v1.9.0 h1:mCx5NxFISl+YcVKcz4u69YktLtuKwRAhdL2ByPlFIbg=
40-
gopkg.in/resty.v1 v1.9.0/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc=
38+
gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
39+
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
4140
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7 h1:+t9dhfO+GNOIGJof6kPOAenx7YgrZMTdRPV+EsnPabk=
4241
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
4342
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

0 commit comments

Comments
 (0)