make
call by omitting redundant arguments SCC-S1019The make
function has default values for the length and capacity arguments.
ch = make(chan int, 0)
sl = make([]int, 1, 1)
ch = make(chan int, 0)
sl = make([]int, 1, 1)
However, using named constants with channels is not considered an antipattern, for accommodating debugging, math, or platform-specific code.
const c = 0
ch = make(chan int, ch) // No issues raised