Original post

I would like to start a discussion about channel type safety.

At the moment, you can do this.
This code compiles.

func main()  {
	ch := make(chan bool)

func someFunc(ch chan bool)  {

Ideally, i would be able to describe what someFunc can actually do to my channel.
chan<- bool and <-chan bool are good, but i think we need more.

This could be done in a specific way for channels or adding a more general behavior description.
Something like Rust’s mut comes to mind.