package chan_test import "testing" func TestClose(t *testing.T) { ch := make(chan int) close(ch) <-ch <-ch <-ch println("ok") }