From b0041d3b0878f0cdfdf4b2e7e3b081eefd9e8868 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 23 Dec 2015 16:52:54 +0900 Subject: [PATCH] Error fixup --- goldsmith.go | 4 ++-- types.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/goldsmith.go b/goldsmith.go index ab22320..b744a37 100644 --- a/goldsmith.go +++ b/goldsmith.go @@ -126,9 +126,9 @@ func (gs *goldsmith) referenceFile(path string) { func (gs *goldsmith) fault(f *file, err error) { gs.errorMtx.Lock() - ferr := &Error{err: err} + ferr := &Error{Err: err} if f != nil { - ferr.path = f.path + ferr.Path = f.path } gs.errors = append(gs.errors, ferr) gs.errorMtx.Unlock() diff --git a/types.go b/types.go index 1a59c31..e6eacd8 100644 --- a/types.go +++ b/types.go @@ -79,12 +79,12 @@ type Context interface { } type Error struct { - path string - err error + Err error + Path string } -func (e *Error) Error() string { - return e.err.Error() +func (e Error) Error() string { + return e.Err.Error() } type Initializer interface {