Different format of error string

This commit is contained in:
Magnus Åhall 2024-03-29 11:16:11 +01:00
parent bc020b2830
commit c66ba0e169

4
pkg.go
View File

@ -52,10 +52,10 @@ func callback(wrapped Error) {
func (wrapped Error) Error() string { func (wrapped Error) Error() string {
var code string var code string
if wrapped.Code != "" { if wrapped.Code != "" {
code = wrapped.Code + " " code = wrapped.Code + ":"
} }
return fmt.Sprintf( return fmt.Sprintf(
"%s[%s:%d] %s", "[%s%s:%d] %s",
code, code,
wrapped.File, wrapped.File,
wrapped.Line, wrapped.Line,