package errors import "fmt" // InvalidCharacter error is created when an invalid character appears. type InvalidCharacter struct { Character string } // Error generates the string representation. func (err *InvalidCharacter) Error() string { return fmt.Sprintf("Invalid character '%s'", err.Character) }