diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-16 23:48:48 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-16 23:48:48 +0900 |
commit | a4620e8c1c7ec79beea1b3468af3c969016123b0 (patch) | |
tree | 05ad4a48731c451172068c7fd617df144305178f /spec/syntax_error.go | |
parent | Add testing for the driver (diff) | |
download | cotia-a4620e8c1c7ec79beea1b3468af3c969016123b0.tar.gz cotia-a4620e8c1c7ec79beea1b3468af3c969016123b0.tar.xz |
Add a line number to error messages
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r-- | spec/syntax_error.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go index 59ef62d..041486d 100644 --- a/spec/syntax_error.go +++ b/spec/syntax_error.go @@ -1,7 +1,5 @@ package spec -import "fmt" - type SyntaxError struct { message string } @@ -13,7 +11,7 @@ func newSyntaxError(message string) *SyntaxError { } func (e *SyntaxError) Error() string { - return fmt.Sprintf("syntax error: %s", e.message) + return e.message } var ( |