Implemented invalid character checks

This commit is contained in:
Eduard Urbach 2024-06-28 19:54:26 +02:00
parent 8362d0a91a
commit 0553706891
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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)
}