Skip to content

Commit b71252a

Browse files
committed
use %q, as used in previous error formatting
1 parent 4363107 commit b71252a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parser/meta/error.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ type Error struct {
1616

1717
func (e *Error) Error() string {
1818
if e.occuredAt == 0 && e.occuredIn == "" {
19-
return fmt.Sprintf("found %s but expected [%s]", e.Found, e.Expected)
19+
return fmt.Sprintf("found %q but expected [%s]", e.Found, e.Expected)
2020
}
21-
return fmt.Sprintf("found %s but expected [%s] at %s:%d", e.Found, e.Expected, e.occuredIn, e.occuredAt)
21+
return fmt.Sprintf("found %q but expected [%s] at %s:%d", e.Found, e.Expected, e.occuredIn, e.occuredAt)
2222
}
2323

2424
// SetOccured sets the file and the line number at which the error was raised (through runtime.Caller).

0 commit comments

Comments
 (0)