code: func (a *Adapter) Stream(logstream chan *router.Message) {
  	for message := range logstream {
  		buf := new(bytes.Buffer)
  		err := a.tmpl.Execute(buf, message)
  		if err != nil {
  			log.Println("raw:", err)
  			return
  		}
  		//log.Println("debug:", buf.String())
  		_, err = a.conn.Write(buf.Bytes())
  		if err != nil {
  			log.Println("raw:", err)
  			if reflect.TypeOf(a.conn).String() != "*net.UDPConn" {
  				return
  			}
  		}
  	}
  }
docs: // Stream sends log data to a connection