goldsmith/error.go
2018-12-08 11:18:51 -08:00

19 lines
256 B
Go

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