diff --git a/lib/ksuid/id_test.go b/lib/ksuid/id_test.go index 7bf2744..95fbde4 100644 --- a/lib/ksuid/id_test.go +++ b/lib/ksuid/id_test.go @@ -1,3 +1,4 @@ +//nolint:gosec // we're using fixed timestamps for tests package ksuid import ( diff --git a/lib/ksuid/node.go b/lib/ksuid/node.go index a217286..923e2e6 100644 --- a/lib/ksuid/node.go +++ b/lib/ksuid/node.go @@ -55,6 +55,7 @@ func (n *Node) Generate(ctx context.Context, resource string) (id ID) { n.sequenceMu.Lock() + //nolint:gosec // this will be fine for a very, very long time timestamp := uint64(time.Now().UTC().Unix()) if (timestamp - n.timestamp) >= 1 { n.timestamp = timestamp diff --git a/lib/middleware/request/logger_test.go b/lib/middleware/request/logger_test.go index 8856d72..19192ef 100644 --- a/lib/middleware/request/logger_test.go +++ b/lib/middleware/request/logger_test.go @@ -46,8 +46,6 @@ func TestResponseWriter(t *testing.T) { } func TestLogger(t *testing.T) { - ctx := context.Background() - tests := []struct { Name string Status int @@ -60,6 +58,7 @@ func TestLogger(t *testing.T) { for _, test := range tests { t.Run(test.Name, func(t *testing.T) { + ctx := context.Background() is := is.New(t) log := logrus.New().WithField("foo", "bar")