code: func (c *StatsdClient) send(stat string, format string, value interface{}, sampleRate float32) error {
  	if c.conn == nil {
  		return errNotConnected
  	}
  
  	stat = strings.Replace(stat, "%HOST%", Hostname, 1)
  	metricString := c.prefix + stat + ":" + fmt.Sprintf(format, value)
  
  	if sampleRate != 1 {
  		metricString = fmt.Sprintf("%s|@%f", metricString, sampleRate)
  	}
  
  	// if sending tcp append a newline
  	if c.sockType == tcpSocket {
  		metricString += "\n"
  	}
  
  	_, err := fmt.Fprint(c.conn, metricString)
  	return err
  }
docs: // write a UDP packet with the statsd event