Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Sep 10, 2024
1 parent 74043c7 commit 9bf5f3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions internal/datastore/postgres/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,15 @@ func (pgd *pgDatastore) loadNamespaceChanges(ctx context.Context, xmin uint64, x
return nil
}

func (pgd *pgDatastore) loadCaveatChanges(ctx context.Context, min uint64, max uint64, txidToRevision map[uint64]postgresRevision, filter map[uint64]int, tracked *common.Changes[postgresRevision, uint64]) error {
func (pgd *pgDatastore) loadCaveatChanges(ctx context.Context, minimum uint64, maximum uint64, txidToRevision map[uint64]postgresRevision, filter map[uint64]int, tracked *common.Changes[postgresRevision, uint64]) error {
sql, args, err := queryChangedCaveats.Where(sq.Or{
sq.And{
sq.LtOrEq{colCreatedXid: max},
sq.GtOrEq{colCreatedXid: min},
sq.LtOrEq{colCreatedXid: maximum},
sq.GtOrEq{colCreatedXid: minimum},
},
sq.And{
sq.LtOrEq{colDeletedXid: max},
sq.GtOrEq{colDeletedXid: min},
sq.LtOrEq{colDeletedXid: maximum},
sq.GtOrEq{colDeletedXid: minimum},
},
}).ToSql()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/v1/experimental_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ func constBatch(size int) func() int {
}
}

func randomBatch(min int, max int) func() int {
func randomBatch(minimum, max int) func() int {

Check failure on line 120 in internal/services/v1/experimental_test.go

View workflow job for this annotation

GitHub Actions / Lint Go

param max has same name as predeclared identifier (predeclared)
return func() int {
// nolint:gosec
// G404 use of non cryptographically secure random number generator is not a security concern here,
// as this is only used for generating fixtures in testing.
return rand.Intn(max-min) + min
return rand.Intn(max-minimum) + minimum
}
}

Expand Down

0 comments on commit 9bf5f3d

Please sign in to comment.