Skip to content

Commit

Permalink
🔄 Sync from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mojo-machine[bot] committed Sep 10, 2024
1 parent a00a5c0 commit 2c60218
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/ksuid/id_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint:gosec // we're using fixed timestamps for tests
package ksuid

import (
Expand Down
1 change: 1 addition & 0 deletions lib/ksuid/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/middleware/request/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ func TestResponseWriter(t *testing.T) {
}

func TestLogger(t *testing.T) {
ctx := context.Background()

tests := []struct {
Name string
Status int
Expand All @@ -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")
Expand Down

0 comments on commit 2c60218

Please sign in to comment.