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 / simple / testdata / src / CheckMakeLenCap / LintMakeLenCap.go
1 package pkg
2
3 func fn() {
4         const c = 0
5         var x, y int
6         type s []int
7         type ch chan int
8         _ = make([]int, 1)
9         _ = make([]int, 0)       // length is mandatory for slices, don't suggest removal
10         _ = make(s, 0)           // length is mandatory for slices, don't suggest removal
11         _ = make(chan int, c)    // constant of 0 may be due to debugging, math or platform-specific code
12         _ = make(chan int, 0)    // want `should use make\(chan int\) instead`
13         _ = make(ch, 0)          // want `should use make\(ch\) instead`
14         _ = make(map[int]int, 0) // want `should use make\(map\[int\]int\) instead`
15         _ = make([]int, 1, 1)    // want `should use make\(\[\]int, 1\) instead`
16         _ = make([]int, x, x)    // want `should use make\(\[\]int, x\) instead`
17         _ = make([]int, 1, 2)
18         _ = make([]int, x, y)
19 }