code: func (sc ServiceCheck) Encode(tags ...string) (string, error) {
  	err := sc.Check()
  	if err != nil {
  		return "", err
  	}
  	message := sc.escapedMessage()
  
  	var buffer bytes.Buffer
  	buffer.WriteString("_sc|")
  	buffer.WriteString(sc.Name)
  	buffer.WriteRune('|')
  	buffer.WriteString(strconv.FormatInt(int64(sc.Status), 10))
  
  	if !sc.Timestamp.IsZero() {
  		buffer.WriteString("|d:")
  		buffer.WriteString(strconv.FormatInt(int64(sc.Timestamp.Unix()), 10))
  	}
  
  	if len(sc.Hostname) != 0 {
  		buffer.WriteString("|h:")
  		buffer.WriteString(sc.Hostname)
  	}
  
  	writeTagString(&buffer, tags, sc.Tags)
  
  	if len(message) != 0 {
  		buffer.WriteString("|m:")
  		buffer.WriteString(message)
  	}
  
  	return buffer.String(), nil
  }
docs: // Encode returns the dogstatsd wire protocol representation for an serviceCheck.
  // Tags may be passed which will be added to the encoded output but not to
  // the Event's list of tags, eg. for default tags.