Skip to content

Commit

Permalink
fix: tune error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Oct 12, 2022
1 parent b80a230 commit b51d215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/schema/parse_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (e *ParseError) Error() string {
for line := startLineIdx; line <= errorLineIdx; line++ {
s.WriteString(fmt.Sprintf("%4d | %s\n", line, rows[line]))
}
s.WriteString(" ")
s.WriteString(" | ")
for i, r := range rows[errorLineIdx] {
switch {
case start.col == i:
Expand All @@ -59,7 +59,7 @@ func (e *ParseError) Error() string {
s.WriteRune('\n')

if errorLineIdx+1 < len(rows) {
s.WriteString(fmt.Sprintf("%4d | %s\n", errorLineIdx, rows[errorLineIdx+1]))
s.WriteString(fmt.Sprintf("%4d | %s\n", errorLineIdx+1, rows[errorLineIdx+1]))
s.WriteRune('\n')
}

Expand Down

0 comments on commit b51d215

Please sign in to comment.