code: func streamPayload(logger *log.Logger, stdin io.WriteCloser, buf []byte) {
  	defer stdin.Close()
  
  	// Append a newline to payload if missing
  	payload := buf
  	if len(payload) > 0 && payload[len(payload)-1] != '\n' {
  		payload = append(payload, '\n')
  	}
  
  	if _, err := stdin.Write(payload); err != nil {
  		logger.Printf("[ERR] Error writing payload: %s", err)
  		return
  	}
  }
docs: // Sends data on stdin for an event. The stdin simply contains the
  // payload (if any).
  // Most shells read implementations need a newline, force it to be there