Skip to content

Commit

Permalink
Fix golangci warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby committed Sep 15, 2024
1 parent dc8d944 commit fac048d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions middleware/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
}()
Expand Down
2 changes: 1 addition & 1 deletion middleware/etag/etag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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('"')
Expand Down

0 comments on commit fac048d

Please sign in to comment.