Skip to content

Commit 6e2e51d

Browse files
authored
Bump makezero to v1.1.0 (#2490)
1 parent efb3599 commit 6e2e51d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/OpenPeeDeeP/depguard v1.1.0
1212
github.com/alexkohler/prealloc v1.0.0
1313
github.com/ashanbrown/forbidigo v1.3.0
14-
github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde
14+
github.com/ashanbrown/makezero v1.1.0
1515
github.com/bkielbasa/cyclop v1.2.0
1616
github.com/blizzy78/varnamelen v0.5.0
1717
github.com/bombsimon/wsl/v3 v3.3.0

go.sum

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/testdata/makezero.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ func Makezero() []int {
88
return append(x, 1) // ERROR "append to slice `x` with non-zero initialized length"
99
}
1010

11+
func MakezeroMultiple() []int {
12+
x, y := make([]int, math.MaxInt8), make([]int, math.MaxInt8)
13+
return append(x, // ERROR "append to slice `x` with non-zero initialized length"
14+
append(y, 1)...) // ERROR "append to slice `y` with non-zero initialized length"
15+
}
16+
1117
func MakezeroNolint() []int {
1218
x := make([]int, math.MaxInt8)
1319
return append(x, 1) //nolint:makezero // ok that we're appending to an uninitialized slice

0 commit comments

Comments
 (0)