From 07e3d60146de6c5906382e378cdcb3d6a6989cd0 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Tue, 14 Feb 2017 14:37:12 +0100 Subject: Change Output interface to return an error --- output/http/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'output/http') diff --git a/output/http/http.go b/output/http/http.go index 3ea603c..158f091 100644 --- a/output/http/http.go +++ b/output/http/http.go @@ -22,9 +22,11 @@ func New(kv map[string]string) output.Output { return &HttpOutput{url: url} } -func (h *HttpOutput) Output(w *work.Work) { +func (h *HttpOutput) Output(w *work.Work) error { _, err := http.Post(h.url, "application/json", bytes.NewReader(w.Data)) if err != nil { w.Err = err } + + return err } -- cgit v1.2.3