goldsmith/error.go
2018-12-09 17:00:46 -08:00

19 lines
266 B
Go

package goldsmith
import "fmt"
type Error struct {
Name string
Path string
Err error
}
func (err Error) Error() string {
var path string
if len(err.Path) > 0 {
path = "@" + err.Path
}
return fmt.Sprintf("[%s%s]: %s", err.Name, path, err.Err.Error())
}