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) {
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()

View File

@ -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 {