this is working out so far
This commit is contained in:
parent
ecf4049947
commit
16b0cad836
|
@ -109,6 +109,22 @@ func (p *Patches) SendReply(w http.ResponseWriter, reqPB *httppb.HttpRequest) er
|
|||
return err
|
||||
}
|
||||
|
||||
func (p *Patchsets) SendReply(w http.ResponseWriter, reqPB *httppb.HttpRequest) error {
|
||||
data, err := p.Marshal()
|
||||
if err != nil {
|
||||
reqPB.Errors = append(reqPB.Errors, log.Sprintf("%v", err))
|
||||
}
|
||||
if len(data) == 0 {
|
||||
reqPB.Errors = append(reqPB.Errors, "Patchsets PB data was nil/emtpy without Marsha() error")
|
||||
return nil
|
||||
}
|
||||
i, err := w.Write(data)
|
||||
if err != nil {
|
||||
reqPB.Errors = append(reqPB.Errors, log.Sprintf("i=%d %v", i, err))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *Patchsets) HttpPostVerbose(baseURL string, route string) (*Patchsets, error) {
|
||||
p.PrintTable()
|
||||
return p.HttpPost(baseURL, route)
|
||||
|
|
Loading…
Reference in New Issue