Skip to content

Commit ae2ec80

Browse files
authored
Merge pull request #1678 from gofiber/update_all
refactor: update all pkg
2 parents f728ac3 + 5d8481a commit ae2ec80

28 files changed

Lines changed: 51 additions & 42 deletions

File tree

v3/hcaptcha/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7-
"strings"
87

98
"github.com/gofiber/fiber/v3"
9+
"github.com/gofiber/utils/v2"
1010
)
1111

1212
// DefaultSiteVerifyURL is the default URL for the HCaptcha API
@@ -41,7 +41,7 @@ func DefaultResponseKeyFunc(c fiber.Ctx) (string, error) {
4141
return "", fmt.Errorf("failed to decode HCaptcha token: %w", err)
4242
}
4343

44-
if strings.TrimSpace(data.HCaptchaToken) == "" {
44+
if utils.TrimSpace(data.HCaptchaToken) == "" {
4545
return "", fmt.Errorf("hcaptcha token is empty")
4646
}
4747

v3/hcaptcha/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.25.0
44

55
require (
66
github.com/gofiber/fiber/v3 v3.0.0
7+
github.com/gofiber/utils/v2 v2.0.1
78
github.com/stretchr/testify v1.11.1
89
github.com/valyala/fasthttp v1.69.0
910
)
@@ -12,7 +13,6 @@ require (
1213
github.com/andybalholm/brotli v1.2.0 // indirect
1314
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1415
github.com/gofiber/schema v1.6.0 // indirect
15-
github.com/gofiber/utils/v2 v2.0.0 // indirect
1616
github.com/google/uuid v1.6.0 // indirect
1717
github.com/klauspost/compress v1.18.3 // indirect
1818
github.com/kr/pretty v0.3.1 // indirect

v3/hcaptcha/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ github.com/gofiber/fiber/v3 v3.0.0 h1:GPeCG8X60L42wLKrzgeewDHBr6pE6veAvwaXsqD3Xj
99
github.com/gofiber/fiber/v3 v3.0.0/go.mod h1:kVZiO/AwyT5Pq6PgC8qRCJ+j/BHrMy5jNw1O9yH38aY=
1010
github.com/gofiber/schema v1.6.0 h1:rAgVDFwhndtC+hgV7Vu5ItQCn7eC2mBA4Eu1/ZTiEYY=
1111
github.com/gofiber/schema v1.6.0/go.mod h1:WNZWpQx8LlPSK7ZaX0OqOh+nQo/eW2OevsXs1VZfs/s=
12-
github.com/gofiber/utils/v2 v2.0.0 h1:SCC3rpsEDWupFSHtc0RKxg/BKgV0s1qKfZg9Jv6D0sM=
13-
github.com/gofiber/utils/v2 v2.0.0/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
12+
github.com/gofiber/utils/v2 v2.0.1 h1:+kvhvoGuAeUBzF/Qlkx5HvFK7tNd62mxSpBuI0zCRII=
13+
github.com/gofiber/utils/v2 v2.0.1/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
1414
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1515
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1616
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=

v3/i18n/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.0
44

55
require (
66
github.com/gofiber/fiber/v3 v3.0.0
7-
github.com/gofiber/utils/v2 v2.0.0
7+
github.com/gofiber/utils/v2 v2.0.1
88
github.com/nicksnyder/go-i18n/v2 v2.6.1
99
github.com/stretchr/testify v1.11.1
1010
golang.org/x/text v0.33.0

v3/i18n/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ github.com/gofiber/fiber/v3 v3.0.0 h1:GPeCG8X60L42wLKrzgeewDHBr6pE6veAvwaXsqD3Xj
1111
github.com/gofiber/fiber/v3 v3.0.0/go.mod h1:kVZiO/AwyT5Pq6PgC8qRCJ+j/BHrMy5jNw1O9yH38aY=
1212
github.com/gofiber/schema v1.6.0 h1:rAgVDFwhndtC+hgV7Vu5ItQCn7eC2mBA4Eu1/ZTiEYY=
1313
github.com/gofiber/schema v1.6.0/go.mod h1:WNZWpQx8LlPSK7ZaX0OqOh+nQo/eW2OevsXs1VZfs/s=
14-
github.com/gofiber/utils/v2 v2.0.0 h1:SCC3rpsEDWupFSHtc0RKxg/BKgV0s1qKfZg9Jv6D0sM=
15-
github.com/gofiber/utils/v2 v2.0.0/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
14+
github.com/gofiber/utils/v2 v2.0.1 h1:+kvhvoGuAeUBzF/Qlkx5HvFK7tNd62mxSpBuI0zCRII=
15+
github.com/gofiber/utils/v2 v2.0.1/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
1616
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1717
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1818
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=

v3/monitor/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.25.0
44

55
require (
66
github.com/gofiber/fiber/v3 v3.0.0
7+
github.com/gofiber/utils/v2 v2.0.1
78
github.com/shirou/gopsutil/v4 v4.26.1
89
github.com/stretchr/testify v1.11.1
910
github.com/valyala/fasthttp v1.69.0
@@ -15,7 +16,6 @@ require (
1516
github.com/ebitengine/purego v0.9.1 // indirect
1617
github.com/go-ole/go-ole v1.3.0 // indirect
1718
github.com/gofiber/schema v1.6.0 // indirect
18-
github.com/gofiber/utils/v2 v2.0.0 // indirect
1919
github.com/google/uuid v1.6.0 // indirect
2020
github.com/klauspost/compress v1.18.3 // indirect
2121
github.com/kr/pretty v0.3.1 // indirect

v3/monitor/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ github.com/gofiber/fiber/v3 v3.0.0 h1:GPeCG8X60L42wLKrzgeewDHBr6pE6veAvwaXsqD3Xj
1414
github.com/gofiber/fiber/v3 v3.0.0/go.mod h1:kVZiO/AwyT5Pq6PgC8qRCJ+j/BHrMy5jNw1O9yH38aY=
1515
github.com/gofiber/schema v1.6.0 h1:rAgVDFwhndtC+hgV7Vu5ItQCn7eC2mBA4Eu1/ZTiEYY=
1616
github.com/gofiber/schema v1.6.0/go.mod h1:WNZWpQx8LlPSK7ZaX0OqOh+nQo/eW2OevsXs1VZfs/s=
17-
github.com/gofiber/utils/v2 v2.0.0 h1:SCC3rpsEDWupFSHtc0RKxg/BKgV0s1qKfZg9Jv6D0sM=
18-
github.com/gofiber/utils/v2 v2.0.0/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
17+
github.com/gofiber/utils/v2 v2.0.1 h1:+kvhvoGuAeUBzF/Qlkx5HvFK7tNd62mxSpBuI0zCRII=
18+
github.com/gofiber/utils/v2 v2.0.1/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE=
1919
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
2020
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
2121
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

v3/monitor/index.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package monitor
22

33
import (
4-
"strconv"
54
"strings"
65
"time"
6+
7+
"github.com/gofiber/utils/v2"
78
)
89

910
type viewBag struct {
@@ -20,7 +21,7 @@ func newIndex(dat viewBag) string {
2021
if timeout < timeoutDiff {
2122
timeout = timeoutDiff
2223
}
23-
ts := strconv.FormatInt(timeout, 10)
24+
ts := utils.FormatInt(timeout)
2425
replacer := strings.NewReplacer("$TITLE", dat.title, "$TIMEOUT", ts,
2526
"$FONT_URL", dat.fontURL, "$CHART_JS_URL", dat.chartJSURL, "$CUSTOM_HEAD", dat.customHead,
2627
)

v3/newrelic/fiber.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ func createTransactionName(c fiber.Ctx) string {
121121

122122
func createWebRequest(c fiber.Ctx, host, method, scheme string, filter func(key, value string) bool) newrelic.WebRequest {
123123
headers := make(http.Header, c.Request().Header.Len())
124-
c.Request().Header.VisitAll(func(key, value []byte) {
124+
for key, value := range c.Request().Header.All() {
125125
headerKey := string(key)
126126
headerValue := string(value)
127127

128128
if filter != nil && !filter(headerKey, headerValue) {
129-
return
129+
continue
130130
}
131131

132132
headers.Add(headerKey, headerValue)
133-
})
133+
}
134134

135135
return newrelic.WebRequest{
136136
Header: headers,

v3/newrelic/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.0
44

55
require (
66
github.com/gofiber/fiber/v3 v3.0.0
7-
github.com/gofiber/utils/v2 v2.0.0
7+
github.com/gofiber/utils/v2 v2.0.1
88
github.com/newrelic/go-agent/v3 v3.42.0
99
github.com/stretchr/testify v1.11.1
1010
)

0 commit comments

Comments
 (0)