Bump golangci-lint to v1.61.0 (#3135)

* Bump golangci-lint to v1.61.0

* Fix golangci warnings
pull/3134/head^2
Juan Calderon-Perez 2024-09-15 13:28:22 -04:00 committed by GitHub
parent 37f1a65c4c
commit 0ef8d716ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -37,4 +37,4 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
# NOTE: Keep this in sync with the version from .golangci.yml
version: v1.60.3
version: v1.61.0

View File

@ -35,7 +35,7 @@ markdown:
## lint: 🚨 Run lint checks
.PHONY: lint
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3 run ./...
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run ./...
## test: 🚦 Execute all tests
.PHONY: test

View File

@ -63,7 +63,7 @@ func New(config ...Config) fiber.Handler {
var (
// Cache settings
mux = &sync.RWMutex{}
timestamp = uint64(time.Now().Unix())
timestamp = uint64(time.Now().Unix()) //nolint:gosec //Not a concern
)
// Create manager to simplify storage operations ( see manager.go )
manager := newManager(cfg.Storage)
@ -75,7 +75,7 @@ func New(config ...Config) fiber.Handler {
// Update timestamp in the configured interval
go func() {
for {
atomic.StoreUint64(&timestamp, uint64(time.Now().Unix()))
atomic.StoreUint64(&timestamp, uint64(time.Now().Unix())) //nolint:gosec //Not a concern
time.Sleep(timestampUpdatePeriod)
}
}()

View File

@ -65,7 +65,7 @@ func New(config ...Config) fiber.Handler {
return c.SendStatus(fiber.StatusRequestEntityTooLarge)
}
bb.B = appendUint(bb.Bytes(), uint32(bodyLength)) //nolint:gosec // Body length is validated above
bb.B = appendUint(bb.Bytes(), uint32(bodyLength))
bb.WriteByte('-')
bb.B = appendUint(bb.Bytes(), crc32.Checksum(body, crc32q))
bb.WriteByte('"')