Skip to content

Commit b74d1da

Browse files
committed
validation/linux_cgroups_relative_cpus: fix staticcheck warning
Staticcheck complains: > validation/linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.go:14:17: ST1023: should omit type string from declaration; it will be inferred from the right-hand side (staticcheck) > var cpus, mems string = "0-1", "0" > ^ Fix this, and while at it, use constants. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 40e96e5 commit b74d1da

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

validation/linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.go

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

1010
func main() {
11-
var shares uint64 = 1024
12-
var period uint64 = 100000
13-
var quota int64 = 50000
14-
var cpus, mems string = "0-1", "0"
11+
const (
12+
shares uint64 = 1024
13+
period uint64 = 100000
14+
quota int64 = 50000
15+
cpus, mems = "0-1", "0"
16+
)
1517

1618
t := tap.New()
1719
t.Header(0)

0 commit comments

Comments
 (0)