clierror

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 8 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 CLIError

type CLIError struct {
	// contains filtered or unexported fields
}

func NewCLIError

func NewCLIError(err error, sanitizedMsg string) *CLIError

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) SanitizedError

func (e *CLIError) SanitizedError() string

func (*CLIError) SanitizedStack

func (e *CLIError) SanitizedStack() string

type PanicError

type PanicError struct {
	// contains filtered or unexported fields
}

PanicError is used to collect goroutine panics into an error interface so that we can do type assertion on err checking.

func NewPanicError

func NewPanicError(err error, stack []byte) *PanicError

func (*PanicError) Error

func (p *PanicError) Error() string

func (*PanicError) SanitizedError

func (p *PanicError) SanitizedError() string

func (*PanicError) SanitizedStack

func (p *PanicError) SanitizedStack() string

type SanitizedError

type SanitizedError interface {
	SanitizedError() string
	SanitizedStack() string
}

SanitizedError allows errors to be wrapped with a sanitized message for sending upstream

type WarningError

type WarningError struct {
	// contains filtered or unexported fields
}

WarningError is an error that adhears to the error interface but is used to convey a non-critical path in the application code. WarningError messages should be considered safe to display to the user.

func NewWarning

func NewWarning(warning string) WarningError

NewWarning returns a new WarningError using warning as the error string.

func NewWarningF

func NewWarningF(warning string, args ...any) WarningError

NewWarningF returns a new WarningError using the warning as a formatted string.

func (WarningError) Error

func (w WarningError) Error() string

Jump to

Keyboard shortcuts

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