Skip to content

Commit fac048d

Browse files
committed
Fix golangci warnings
1 parent dc8d944 commit fac048d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

middleware/cache/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func New(config ...Config) fiber.Handler {
6363
var (
6464
// Cache settings
6565
mux = &sync.RWMutex{}
66-
timestamp = uint64(time.Now().Unix())
66+
timestamp = uint64(time.Now().Unix()) //nolint:gosec //Not a concern
6767
)
6868
// Create manager to simplify storage operations ( see manager.go )
6969
manager := newManager(cfg.Storage)
@@ -75,7 +75,7 @@ func New(config ...Config) fiber.Handler {
7575
// Update timestamp in the configured interval
7676
go func() {
7777
for {
78-
atomic.StoreUint64(&timestamp, uint64(time.Now().Unix()))
78+
atomic.StoreUint64(&timestamp, uint64(time.Now().Unix())) //nolint:gosec //Not a concern
7979
time.Sleep(timestampUpdatePeriod)
8080
}
8181
}()

middleware/etag/etag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func New(config ...Config) fiber.Handler {
6565
return c.SendStatus(fiber.StatusRequestEntityTooLarge)
6666
}
6767

68-
bb.B = appendUint(bb.Bytes(), uint32(bodyLength)) //nolint:gosec // Body length is validated above
68+
bb.B = appendUint(bb.Bytes(), uint32(bodyLength))
6969
bb.WriteByte('-')
7070
bb.B = appendUint(bb.Bytes(), crc32.Checksum(body, crc32q))
7171
bb.WriteByte('"')

0 commit comments

Comments
 (0)