summaryrefslogtreecommitdiffstats
path: root/vendor/go.jolheiser.com/pwn/error.go
blob: 2c73ed5cee6790ea28d063841b1668df6632968a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package pwn

// ErrEmptyPassword is an empty password error
type ErrEmptyPassword struct{}

// Error fulfills the error interface
func (e ErrEmptyPassword) Error() string {
	return "password cannot be empty"
}

// IsErrEmptyPassword checks if an error is ErrEmptyPassword
func IsErrEmptyPassword(err error) bool {
	_, ok := err.(ErrEmptyPassword)
	return ok
}