Skip to content

Commit

Permalink
v3 (deps): update to use gofiber/utils/v2 (#2184)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisCarr authored Oct 31, 2022
1 parent 543e8bb commit f26d9b1
Show file tree
Hide file tree
Showing 39 changed files with 44 additions and 42 deletions.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sync"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package fiber

import (
"github.com/gofiber/fiber/v3/binder"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// An interface to register custom binders.
Expand Down
2 changes: 1 addition & 1 deletion binder/cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strings"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion binder/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strings"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion binder/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strings"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion binder/json.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package binder

import (
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

type jsonBinding struct{}
Expand Down
2 changes: 1 addition & 1 deletion binder/mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/gofiber/fiber/v3/internal/schema"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/bytebufferpool"
)

Expand Down
2 changes: 1 addition & 1 deletion binder/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strings"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion binder/resp_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"strings"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"sync"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"text/template"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/savsgio/dictpool"
"github.com/valyala/bytebufferpool"
"github.com/valyala/fasthttp"
Expand Down
2 changes: 1 addition & 1 deletion ctx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"time"

"github.com/gofiber/fiber/v3/internal/storage/memory"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/bytebufferpool"
"github.com/valyala/fasthttp"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module github.com/gofiber/fiber/v3
go 1.19

require (
github.com/gofiber/utils v1.0.0
github.com/gofiber/utils/v2 v2.0.0-beta.1
github.com/google/uuid v1.3.0
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94
github.com/stretchr/testify v1.8.0
github.com/stretchr/testify v1.8.1
github.com/tinylib/msgp v1.1.6
github.com/valyala/bytebufferpool v1.0.0
github.com/valyala/fasthttp v1.41.0
Expand Down
8 changes: 5 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofiber/utils v1.0.0 h1:goxlTmYidOhsCvuZuTLzT224DELpnz9c/+iw5eN9FJw=
github.com/gofiber/utils v1.0.0/go.mod h1:RYennBgjLkuNtU+dxg7QgBEU8tmixFQHQ2GE1ioZlxw=
github.com/gofiber/utils/v2 v2.0.0-beta.1 h1:ACfPdqeclx+BFIja19UjkKx7k3r5tmpILpNgzrfPLKs=
github.com/gofiber/utils/v2 v2.0.0-beta.1/go.mod h1:CG89nDoIkEFIJaw5LdLO9AmBM11odse/LC79KQujm74=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
Expand All @@ -24,9 +24,11 @@ github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJx
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw=
github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
Expand Down
2 changes: 1 addition & 1 deletion helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/fasthttp"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync/atomic"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

type Storage struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/memory/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/storage/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync/atomic"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Storage interface that is implemented by storage providers
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/memory/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion middleware/adaptor/adopter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
"github.com/valyala/fasthttp/fasthttpadaptor"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/basicauth/basicauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// New creates a new middleware handler
Expand Down
2 changes: 1 addition & 1 deletion middleware/basicauth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"crypto/subtle"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Config defines the config for middleware.
Expand Down
2 changes: 1 addition & 1 deletion middleware/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// timestampUpdatePeriod is the period which is used to check the cache expiration.
Expand Down
2 changes: 1 addition & 1 deletion middleware/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/internal/storage/memory"
"github.com/gofiber/fiber/v3/middleware/etag"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/fasthttp"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/cache/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Config defines the config for middleware.
Expand Down
2 changes: 1 addition & 1 deletion middleware/csrf/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Config defines the config for middleware.
Expand Down
2 changes: 1 addition & 1 deletion middleware/csrf/csrf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/fasthttp"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/csrf/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/internal/memory"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// go:generate msgp
Expand Down
2 changes: 1 addition & 1 deletion middleware/limiter/limiter_fixed.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync/atomic"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

type FixedWindow struct{}
Expand Down
2 changes: 1 addition & 1 deletion middleware/limiter/limiter_sliding.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

type SlidingWindow struct{}
Expand Down
2 changes: 1 addition & 1 deletion middleware/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

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

"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/internal/tlstest"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/fasthttp"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/requestid/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package requestid

import (
"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Config defines the config for middleware.
Expand Down
2 changes: 1 addition & 1 deletion middleware/session/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
)

// Config defines the config for middleware.
Expand Down
2 changes: 1 addition & 1 deletion middleware/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/gofiber/fiber/v3"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion middleware/session/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/internal/storage/memory"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

Expand Down
2 changes: 1 addition & 1 deletion redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"

"github.com/gofiber/fiber/v3/binder"
"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/bytebufferpool"
)

Expand Down
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync/atomic"
"time"

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)

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

"github.com/gofiber/utils"
"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
"github.com/valyala/fasthttp"
)
Expand Down

1 comment on commit f26d9b1

@ReneWerner87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: f26d9b1 Previous: 421039f Ratio
Benchmark_AcquireCtx 1480 ns/op 1568 B/op 5 allocs/op 637.9 ns/op 1568 B/op 5 allocs/op 2.32

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.