errors

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserError

type UserError struct {
	Message    string
	Suggestion string
}

UserError represents an error with a user-friendly message and optional suggestion

func AuthenticationFailed

func AuthenticationFailed() *UserError

AuthenticationFailed returns an error for failed authentication

func MutuallyExclusive

func MutuallyExclusive(arg, flag string) *UserError

MutuallyExclusive returns an error when mutually exclusive options are both provided

func NetworkError

func NetworkError(serverURL string, cause error) *UserError

NetworkError returns an error for network issues

func New

func New(message string) *UserError

New creates a new UserError with just a message

func NotFound

func NotFound(resource, id string) *UserError

NotFound returns an error for resources that don't exist

func PermissionDenied

func PermissionDenied(action string) *UserError

PermissionDenied returns an error for permission issues

func ReadOnly added in v0.7.0

func ReadOnly(method string) *UserError

ReadOnly returns an error when a write operation is attempted in read-only mode

func RequiredFlag

func RequiredFlag(flag string) *UserError

RequiredFlag returns an error for missing required flags in non-interactive mode

func WithSuggestion

func WithSuggestion(message, suggestion string) *UserError

WithSuggestion creates a new UserError with a message and suggestion

func (*UserError) Error

func (e *UserError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL