cmdutil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BoldStyle = lipgloss.NewStyle().Bold(true)
)
View Source
var ErrCancelError = errors.New("CancelError")

ErrCancelError signals user-initiated cancellation

View Source
var ErrPendingError = errors.New("PendingError")

ErrPendingError signals nothing failed but something is pending

View Source
var ErrSilentError = errors.New("SilentError")

ErrSilentError is an error that triggers exit code 1 without any error messaging

Functions

func DeprecateWarn

func DeprecateWarn(ctx *config.Context)

func FlagConfigFile

func FlagConfigFile(cmd *cobra.Command, dest *string)

func FlagErrorWrap

func FlagErrorWrap(err error) error

FlagErrorWrap returns a new FlagError that wraps the specified error.

func FlagErrorf

func FlagErrorf(format string, args ...any) error

Error unrelated to usage FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).

func IsUserCancellation

func IsUserCancellation(err error) bool

func LoadConfig

func LoadConfig(path string) (*config.Project, error)

func SetCommonContext

func SetCommonContext(ctx *config.Context, common CommonOptions)

func SetCommonFlags

func SetCommonFlags(cmd *cobra.Command, common *CommonOptions)

func TimedRunE

func TimedRunE(verb string, runef func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error

Types

type CommonOptions

type CommonOptions struct {
	ConfigFile string
	AppVersion string
	ImageTag   string
	ImageUri   string
}

type ExitError

type ExitError struct {
	Err     error
	Code    int
	Details string
}

func WrapError

func WrapError(err error, log string) *ExitError

func WrapErrorWithCode

func WrapErrorWithCode(err error, code int, details string) *ExitError

func (*ExitError) Error

func (e *ExitError) Error() string

type FlagError

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

A *FlagError indicates an error processing command-line flags or other arguments. Such errors cause the application to display the usage message.

func (*FlagError) Error

func (fe *FlagError) Error() string

func (*FlagError) Unwrap

func (fe *FlagError) Unwrap() error

Jump to

Keyboard shortcuts

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