Sagi Dayan
d5d1eecb89
Some checks failed
Codespell / Check for spelling errors (push) Failing after 1m26s
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
15 lines
260 B
Go
15 lines
260 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
type NoKeyFoundError struct {
|
|
key string
|
|
}
|
|
|
|
func (e *NoKeyFoundError) Error() string {
|
|
return fmt.Sprintf("key %s not found", e.key)
|
|
}
|
|
|
|
func NewNoKeyFoundError(key string) *NoKeyFoundError {
|
|
return &NoKeyFoundError{key: key}
|
|
}
|