mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
16 lines
376 B
Go
16 lines
376 B
Go
package cli
|
|
|
|
// CancelledError signals an interactive command was aborted by the user at a confirmation prompt.
|
|
type CancelledError struct {
|
|
Message string
|
|
}
|
|
|
|
func (e *CancelledError) Error() string {
|
|
return e.Message
|
|
}
|
|
|
|
// Cancelled returns a CancelledError carrying the given user-facing message.
|
|
func Cancelled(msg string) error {
|
|
return &CancelledError{Message: msg}
|
|
}
|