// newRoom makes a new room hat is ready to go. // the users of our code need only call the newRoom function // instead of the more verbose six lines of code. func newRoom() *room { return &room{ forward: make(chan []byte), join: make(chan *client), leave: make(chan *client), clients: make(map[*client]bool), tracer: trace.Off(), } }
// newRoom makes a new room hat is ready to go. // the users of our code need only call the newRoom function // instead of the more verbose six lines of code. func newRoom(avatar Avatar) *room { return &room{ forward: make(chan *message), join: make(chan *client), leave: make(chan *client), clients: make(map[*client]bool), tracer: trace.Off(), avatar: avatar, } }