code: func (o *AddCommentToTaskDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
  
  	// response header X-Error-Code
  
  	xErrorCode := o.XErrorCode
  	if xErrorCode != "" {
  		rw.Header().Set("X-Error-Code", xErrorCode)
  	}
  
  	rw.WriteHeader(o._statusCode)
  	if o.Payload != nil {
  		payload := o.Payload
  		if err := producer.Produce(rw, payload); err != nil {
  			panic(err) // let the recovery middleware deal with this
  		}
  	}
  }
docs: // WriteResponse to the client