13 lines
237 B
Go
13 lines
237 B
Go
package errors
|
|
|
|
type NoKeyFoundError struct {
|
|
key string
|
|
}
|
|
|
|
func (e *NoKeyFoundError) Error() string {
|
|
return "key " + e.key + " not found"
|
|
}
|
|
|
|
func NewNoKeyFoundError(key string) *NoKeyFoundError {
|
|
return &NoKeyFoundError{key: key}
|
|
}
|