Skip to content

Commit c96d04a

Browse files
committed
all: address govet linter errors
1 parent 3770c78 commit c96d04a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.golangci-lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ linters:
55
enable:
66
- errcheck
77
- ineffassign
8+
- govet
89

910
issues:
1011
exclude-rules:

pkg/code/server/grpc/transaction/v2/treasury.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88

99
"github.com/sirupsen/logrus"
1010

11-
"github.com/code-payments/code-server/pkg/kin"
1211
"github.com/code-payments/code-server/pkg/code/common"
1312
code_data "github.com/code-payments/code-server/pkg/code/data"
1413
"github.com/code-payments/code-server/pkg/code/data/treasury"
14+
"github.com/code-payments/code-server/pkg/kin"
1515
)
1616

1717
// todo: any other treasury-related things we can put here?
@@ -126,7 +126,9 @@ func (s *transactionServer) treasuryPoolMonitor(ctx context.Context, name string
126126
defer cancel()
127127

128128
start := time.Now()
129-
defer time.Sleep(s.conf.treasuryPoolStatsRefreshInterval.Get(ctx) - time.Since(start))
129+
defer func() {
130+
time.Sleep(s.conf.treasuryPoolStatsRefreshInterval.Get(ctx) - time.Since(start))
131+
}()
130132

131133
if treasuryPoolRecord == nil {
132134
treasuryPoolRecord, err = s.data.GetTreasuryPoolByName(ctx, name)

0 commit comments

Comments
 (0)