summaryrefslogtreecommitdiff
path: root/work
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2017-02-19 18:16:51 +0100
committerSilvan Jegen <s.jegen@gmail.com>2017-02-19 18:16:51 +0100
commitb1b366ac99c06cedff8f0ffc808649f27fa98c42 (patch)
treec9b22b3e1616384ace12bcf2d134027739fab847 /work
parentf1eb4962060267458883f86bb5f4093b9b1afc47 (diff)
Use a setter to set the Work error
Diffstat (limited to 'work')
-rw-r--r--work/work.go8
1 files changed, 6 insertions, 2 deletions
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
}