Implemented invalid character checks

This commit is contained in:
Eduard Urbach 2024-06-28 19:54:26 +02:00
parent 6852cbb24e
commit 3664e74074
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
7 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,13 @@
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)
}