-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathError.go
More file actions
20 lines (15 loc) · 714 Bytes
/
Error.go
File metadata and controls
20 lines (15 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package token
// Error is a token error
type Error string
// Error implements the `errors.Error` interface
func (e Error) Error() string {
return string(e)
}
const (
// ErrTokenTooSmall is the error returned or panic'd when a base62 token is smaller than `MinTokenLength`
ErrTokenTooSmall = Error("the base62 token is smaller than MinTokenLength")
// ErrTokenTooBig is the error returned or panic'd when a base62 token is larger than `MaxTokenLength`
ErrTokenTooBig = Error("the base62 token is larger than MaxTokenLength")
// ErrInvalidCharacter is the error returned or panic'd when a non `Base62` string is being parsed
ErrInvalidCharacter = Error("there was a non base62 character in the token")
)