Skip to content

Commit

Permalink
chore: resolve loopclosure warning (celestiaorg#3329)
Browse files Browse the repository at this point in the history
Fixes this warning

![Screenshot 2024-04-16 at 11 45
35 AM](https://github.com/celestiaorg/celestia-app/assets/3699047/285fde0e-076d-42b6-ba91-dcda317ef210)

Ref:
https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/loopclosure

Note: since we're already on Go 1.22, the loop already creates a new
variable per loop iteration so we don't technically need to merge this
but idk how to inform the warning generator that we're already on Go
1.22 and the warning doesn't apply to us.
  • Loading branch information
rootulp authored Apr 17, 2024
1 parent 13a485d commit 8226370
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/test/priority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (s *PriorityTestSuite) TestPriorityByGasPrice() {
wg := &sync.WaitGroup{}
for _, signer := range s.signers {
wg.Add(1)
signer := signer // new variable per iteration
go func() {
defer wg.Done()
// ensure that it is greater than the min gas price
Expand Down

0 comments on commit 8226370

Please sign in to comment.