1package jlexer 2 3import "fmt" 4 5// LexerError implements the error interface and represents all possible errors that can be 6// generated during parsing the JSON data. 7type LexerError struct { 8 Reason string 9 Offset int 10 Data string 11} 12 13func (l *LexerError) Error() string { 14 return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data) 15} 16