github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/makezero_always.go (about) 1 //golangcitest:args -Emakezero 2 //golangcitest:config_path testdata/configs/makezero_always.yml 3 package testdata 4 5 import "math" 6 7 func MakezeroAlways() []int { 8 x := make([]int, math.MaxInt8) // want "slice `x` does not have non-zero initial length" 9 return x 10 } 11 12 func MakezeroAlwaysNolint() []int { 13 x := make([]int, math.MaxInt8) //nolint:makezero // ok that this is not initialized 14 return x 15 }