Documentation
¶
Overview ¶
Package clierr classifies CLI errors into stable codes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBuildFailedRecoverable = errors.New("dev container build failed")
View Source
var ErrRateLimited = errors.New("rate limited")
Functions ¶
func Recoverable ¶ added in v1.11.0
Types ¶
type CLIError ¶
type CLIError struct {
Code Code `json:"code"`
Message string `json:"message"`
Hint string `json:"hint,omitempty"`
Context map[string]string `json:"context,omitempty"`
// contains filtered or unexported fields
}
func (*CLIError) MarshalJSON ¶
func (*CLIError) MarshalLogObject ¶
func (e *CLIError) MarshalLogObject(enc zapcore.ObjectEncoder) error
type Code ¶
type Code string
const ( CodeRateLimited Code = "RATE_LIMITED" CodePanic Code = "PANIC" CodeUnknown Code = "UNKNOWN" CodeBuildFailedRecoverable Code = "BUILD_FAILED_RECOVERABLE" CodeDockerDaemonUnreachable Code = "docker_daemon_unreachable" CodeCanceled Code = "canceled" CodeDeadlineExceeded Code = "deadline_exceeded" )
Click to show internal directories.
Click to hide internal directories.