Skip to content

Commit e5003e4

Browse files
committed
Support gorestful v3
Signed-off-by: Xabier Larrakoetxea <[email protected]>
1 parent d8277f4 commit e5003e4

File tree

8 files changed

+55
-9
lines changed

8 files changed

+55
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
### Added
66

77
- Support Fasthttp library.
8+
- Support gorestful v3
9+
10+
### Changed
11+
12+
- Drop support gorestful v2
813

914
## [0.9.0] - 2020-10-03
1015

examples/gorestful/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os/signal"
88
"syscall"
99

10-
gorestful "github.com/emicklei/go-restful"
10+
gorestful "github.com/emicklei/go-restful/v3"
1111
"github.com/prometheus/client_golang/prometheus/promhttp"
1212
metrics "github.com/slok/go-http-metrics/metrics/prometheus"
1313
"github.com/slok/go-http-metrics/middleware"

go.mod

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/slok/go-http-metrics
22

33
require (
44
contrib.go.opencensus.io/exporter/prometheus v0.4.0
5-
github.com/emicklei/go-restful v2.15.0+incompatible
5+
github.com/emicklei/go-restful/v3 v3.7.1
66
github.com/fasthttp/router v1.4.4
77
github.com/gin-gonic/gin v1.7.4
88
github.com/go-chi/chi v4.1.2+incompatible
@@ -18,4 +18,45 @@ require (
1818
goji.io v2.0.2+incompatible
1919
)
2020

21-
go 1.15
21+
require (
22+
github.com/andybalholm/brotli v1.0.2 // indirect
23+
github.com/beorn7/perks v1.0.1 // indirect
24+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
25+
github.com/davecgh/go-spew v1.1.1 // indirect
26+
github.com/gin-contrib/sse v0.1.0 // indirect
27+
github.com/go-kit/log v0.1.0 // indirect
28+
github.com/go-logfmt/logfmt v0.5.0 // indirect
29+
github.com/go-playground/locales v0.13.0 // indirect
30+
github.com/go-playground/universal-translator v0.17.0 // indirect
31+
github.com/go-playground/validator/v10 v10.4.1 // indirect
32+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
33+
github.com/golang/protobuf v1.4.3 // indirect
34+
github.com/json-iterator/go v1.1.11 // indirect
35+
github.com/klauspost/compress v1.13.4 // indirect
36+
github.com/labstack/gommon v0.3.0 // indirect
37+
github.com/leodido/go-urn v1.2.0 // indirect
38+
github.com/mattn/go-colorable v0.1.8 // indirect
39+
github.com/mattn/go-isatty v0.0.14 // indirect
40+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
41+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
42+
github.com/modern-go/reflect2 v1.0.1 // indirect
43+
github.com/pmezard/go-difflib v1.0.0 // indirect
44+
github.com/prometheus/client_model v0.2.0 // indirect
45+
github.com/prometheus/common v0.28.0 // indirect
46+
github.com/prometheus/procfs v0.6.0 // indirect
47+
github.com/prometheus/statsd_exporter v0.21.0 // indirect
48+
github.com/savsgio/gotils v0.0.0-20210921075833-21a6215cb0e4 // indirect
49+
github.com/stretchr/objx v0.1.1 // indirect
50+
github.com/ugorji/go/codec v1.1.7 // indirect
51+
github.com/valyala/bytebufferpool v1.0.0 // indirect
52+
github.com/valyala/fasttemplate v1.2.1 // indirect
53+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
54+
golang.org/x/net v0.0.0-20210913180222-943fd674d43e // indirect
55+
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0 // indirect
56+
golang.org/x/text v0.3.7 // indirect
57+
google.golang.org/protobuf v1.26.0-rc.1 // indirect
58+
gopkg.in/yaml.v2 v2.4.0 // indirect
59+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
60+
)
61+
62+
go 1.17

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
5757
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5858
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
5959
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
60-
github.com/emicklei/go-restful v2.15.0+incompatible h1:8KpYO/Xl/ZudZs5RNOEhWMBY4hmzlZhhRd9cu+jrZP4=
61-
github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
60+
github.com/emicklei/go-restful/v3 v3.7.1 h1:R5iagkkTsfFpe1nce6Yniw3wmSx0Qw5YP469YzRFNEs=
61+
github.com/emicklei/go-restful/v3 v3.7.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
6262
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
6363
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
6464
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=

middleware/gorestful/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"log"
55
"net/http"
66

7-
gorestful "github.com/emicklei/go-restful"
7+
gorestful "github.com/emicklei/go-restful/v3"
88
"github.com/prometheus/client_golang/prometheus/promhttp"
99

1010
metrics "github.com/slok/go-http-metrics/metrics/prometheus"

middleware/gorestful/gorestful.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package gorestful
44
import (
55
"context"
66

7-
gorestful "github.com/emicklei/go-restful"
7+
gorestful "github.com/emicklei/go-restful/v3"
88

99
"github.com/slok/go-http-metrics/middleware"
1010
)

middleware/gorestful/gorestful_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http/httptest"
77
"testing"
88

9-
gorestful "github.com/emicklei/go-restful"
9+
gorestful "github.com/emicklei/go-restful/v3"
1010
"github.com/stretchr/testify/assert"
1111
"github.com/stretchr/testify/mock"
1212
"github.com/stretchr/testify/require"

test/integration/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
gorestful "github.com/emicklei/go-restful"
11+
gorestful "github.com/emicklei/go-restful/v3"
1212
fasthttprouter "github.com/fasthttp/router"
1313
"github.com/gin-gonic/gin"
1414
"github.com/go-chi/chi"

0 commit comments

Comments
 (0)