github.com/chenfeining/golangci-lint@v1.0.2-0.20230730162517-14c6c67868df/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 }