Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / testdata / src / CheckSingleArgAppend / CheckSingleArgAppend.go
1 package pkg
2
3 func fn(arg []int) {
4         x := append(arg) // want `x = append\(y\) is equivalent to x = y`
5         _ = x
6         y := append(arg, 1)
7         _ = y
8         arg = append(arg) // want `x = append\(y\) is equivalent to x = y`
9         arg = append(arg, 1, 2, 3)
10         var nilly []int
11         arg = append(arg, nilly...)
12         arg = append(arg, arg...)
13
14         append := func([]int) []int { return nil }
15         arg = append(arg)
16 }