mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-01 04:21:58 +00:00
chore(gosec): enable gosec and address findings
This commit is contained in:
Vendored
+3
-2
@@ -9,8 +9,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/bitechdev/ResolveSpec/pkg/logger"
|
||||
"github.com/bradfitz/gomemcache/memcache"
|
||||
|
||||
"github.com/bitechdev/ResolveSpec/pkg/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -137,7 +138,7 @@ func memcacheExpiry(ttl time.Duration) int32 {
|
||||
}
|
||||
secs := int64(ttl.Seconds())
|
||||
if secs > memcacheMaxRelativeTTL {
|
||||
return int32(time.Now().Add(ttl).Unix())
|
||||
return int32(time.Now().Add(ttl).Unix()) //nolint:gosec // G115: value range bounded by caller/type, conversion intentional
|
||||
}
|
||||
if secs == 0 {
|
||||
secs = 1
|
||||
|
||||
Vendored
+2
-1
@@ -7,8 +7,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/bitechdev/ResolveSpec/pkg/logger"
|
||||
"github.com/redis/go-redis/v9"
|
||||
|
||||
"github.com/bitechdev/ResolveSpec/pkg/logger"
|
||||
)
|
||||
|
||||
// RedisProvider is a Redis implementation of the Provider interface.
|
||||
|
||||
Reference in New Issue
Block a user