From b1b366ac99c06cedff8f0ffc808649f27fa98c42 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Sun, 19 Feb 2017 18:16:51 +0100 Subject: Use a setter to set the Work error --- work/work.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'work') diff --git a/work/work.go b/work/work.go index 07461ea..8d53153 100644 --- a/work/work.go +++ b/work/work.go @@ -2,9 +2,13 @@ package work type Work struct { Data []byte - Err error + err error } func (w *Work) Error() error { - return w.Err + return w.err +} + +func (w *Work) SetError(err error) { + w.err = err } -- cgit v1.2.3