Error fixup

This commit is contained in:
Alex Yatskov 2015-12-23 16:52:54 +09:00
parent 0337ec8cbc
commit b0041d3b08
2 changed files with 6 additions and 6 deletions

View File

@ -126,9 +126,9 @@ func (gs *goldsmith) referenceFile(path string) {
func (gs *goldsmith) fault(f *file, err error) { func (gs *goldsmith) fault(f *file, err error) {
gs.errorMtx.Lock() gs.errorMtx.Lock()
ferr := &Error{err: err} ferr := &Error{Err: err}
if f != nil { if f != nil {
ferr.path = f.path ferr.Path = f.path
} }
gs.errors = append(gs.errors, ferr) gs.errors = append(gs.errors, ferr)
gs.errorMtx.Unlock() gs.errorMtx.Unlock()

View File

@ -79,12 +79,12 @@ type Context interface {
} }
type Error struct { type Error struct {
path string Err error
err error Path string
} }
func (e *Error) Error() string { func (e Error) Error() string {
return e.err.Error() return e.Err.Error()
} }
type Initializer interface { type Initializer interface {