aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-07-16 23:48:48 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-07-16 23:48:48 +0900
commita4620e8c1c7ec79beea1b3468af3c969016123b0 (patch)
tree05ad4a48731c451172068c7fd617df144305178f /spec/syntax_error.go
parentAdd testing for the driver (diff)
downloadcotia-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.go4
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 (