Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 0fd1f01

Browse files
committed
Fix linter errors
1 parent df684db commit 0fd1f01

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

components/prometheus/collector/collector.go

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func (c *Collector) Collect() {
4343
metric.collect()
4444
return true
4545
})
46+
4647
return true
4748
})
4849
}
@@ -89,6 +90,7 @@ func (c *Collector) Shutdown() {
8990
metric.shutdown()
9091
return true
9192
})
93+
9294
return true
9395
})
9496
}

pkg/toolset/benchmark.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func benchmarkIO(args []string) error {
6969
ts := time.Now()
7070

7171
lastStatusTime := time.Now()
72-
for i := 0; i < objectCnt; i++ {
72+
for i := range objectCnt {
7373
// one read operation and one write operation per cycle
7474
batchWriter.Enqueue(newBenchmarkObject(store, writeDoneWaitGroup, iotago_tpkg.RandBytes(32), iotago_tpkg.RandBytes(size)))
7575

@@ -154,7 +154,7 @@ func benchmarkCPU(args []string) error {
154154
}
155155
}()
156156

157-
for i := 0; i < numWorkers; i++ {
157+
for range numWorkers {
158158
wg.Add(1)
159159
go func() {
160160
defer wg.Done()

pkg/toolset/pwd_hash.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:err113
12
package toolset
23

34
import (
@@ -128,7 +129,6 @@ func hashPasswordAndSalt(args []string) error {
128129
}
129130

130131
if *outputJSONFlag {
131-
132132
result := struct {
133133
Password string `json:"passwordHash"`
134134
Salt string `json:"passwordSalt"`

pkg/toolset/toolset.go

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const (
5555
)
5656

5757
const (
58+
//nolint:gosec // there is no hardcoded password
5859
passwordEnvKey = "IOTA_CORE_TOOL_PASSWORD"
5960

6061
// printStatusInterval is the interval for printing status messages.

0 commit comments

Comments
 (0)