"Channel types are comparable. Two channel values are
equal if they were created by the same call to make or
if both have value nil." (emphasis mine)
I tried the simplest/obvious (to me) interpretation that "the same make"
meant textually the same file and line number. But no, it appears not:
package main
import "fmt"
func main() {
a := make(chan bool) // created by the make of line 22
b := make(chan bool) // created by the make of line 23
fmt.Printf(" is a == b ? %v \n", a == b) // false. "makes" sense (ha!), as line 22 != line 23.
var slc []chan bool
for i := range 3 {
slc = append(slc, make(chan bool)) // all three are created by the make of line 29.
if i > 0 {
fmt.Printf("is slc[%v] == slc[0] ? %v \n", i, slc[i] == slc[0])
// always says false, even though all 3 were from "the same make", that of line 29.
}
}
}