code: func (conn *Conn) send() {
  	for {
  		select {
  		case line := <-conn.out:
  			if err := conn.write(line); err != nil {
  				logging.Error("irc.send(): %s", err.Error())
  				// We can't defer this, because Close() waits for it.
  				conn.wg.Done()
  				conn.Close()
  				return
  			}
  		case <-conn.die:
  			// control channel closed, bail out
  			conn.wg.Done()
  			return
  		}
  	}
  }
docs: // send is started as a goroutine after a connection is established.
  // It shuttles data from the output channel to write(), and is killed
  // when Conn.die is closed.