diff options
Diffstat (limited to 'error/error.go')
-rw-r--r-- | error/error.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/error/error.go b/error/error.go index 1781f2a..0e5d3af 100644 --- a/error/error.go +++ b/error/error.go @@ -39,6 +39,7 @@ type SpecError struct { FilePath string SourceName string Row int + Col int } func (e *SpecError) Error() string { @@ -46,8 +47,8 @@ func (e *SpecError) Error() string { if e.SourceName != "" { fmt.Fprintf(&b, "%v: ", e.SourceName) } - if e.Row != 0 { - fmt.Fprintf(&b, "%v: ", e.Row) + if e.Row != 0 && e.Col != 0 { + fmt.Fprintf(&b, "%v:%v: ", e.Row, e.Col) } fmt.Fprintf(&b, "error: %v", e.Cause) if e.Detail != "" { |