| 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) //@ diag(`should use make(chan int) instead`) |
| 13 |
_ = make(ch, 0) //@ diag(`should use make(ch) instead`) |
| 14 |
_ = make(map[int]int, 0) |
| 15 |
_ = make([]int, 1, 1) //@ diag(`should use make([]int, 1) instead`) |
| 16 |
_ = make([]int, x, x) //@ diag(`should use make([]int, x) instead`) |
| 17 |
_ = make([]int, 1, 2) |
| 18 |
_ = make([]int, x, y) |
| 19 |
} |