I can initialise a buffered string channel like this
queue := make(chan string, 10)
But how to initialise a buffered channel in a struct in Go ? Basically I want to allocate memory to a buffered string channel. But initially in the struct I would just define it and in struct initialisation, I would like to allocate memory to it
type message struct {
queue *chan string
// or will it be
//queue []chan string
}
func (this *message) init() {
queue = make(chan string,10)
this.queue = &queue
}