15 lines
247 B
Go
15 lines
247 B
Go
|
|
package prompt
|
||
|
|
|
||
|
|
import "fmt"
|
||
|
|
|
||
|
|
type unknownKeyError struct {
|
||
|
|
key string
|
||
|
|
}
|
||
|
|
|
||
|
|
func ErrUnknownKey(key string) error {
|
||
|
|
return unknownKeyError{key: key}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (e unknownKeyError) Error() string {
|
||
|
|
return fmt.Sprintf("unknown prompt key: %s", e.key)
|
||
|
|
}
|