cmd

package
v0.0.0-...-ea0ecbd Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFlagDebugName        = "debug"
	DefaultFlagDebugDescription = "debug mode"
)

Variables

This section is empty.

Functions

func BuildUse

func BuildUse(args ...string) string

func ExecuteRequireNoError

func ExecuteRequireNoError(cmd *cobra.Command)

func Fatal

func Fatal(cmd *cobra.Command, err error)

func InitDefaultCmdRoot

func InitDefaultCmdRoot(shortName string, opts ...Option) (*cobra.Command, error)

func LogCommand

func LogCommand(cmd *cobra.Command, args []string)

func RequireNoError

func RequireNoError(cmd *cobra.Command, err error)

Types

type ActionFunc

type ActionFunc func(cmd *cobra.Command, args []string)

func MultipleActions

func MultipleActions(actions ...ActionFunc) ActionFunc

type Option

func WithCustomVersion

func WithCustomVersion(version itbasisCoreVersion.Version) Option

func WithDefaultErr

func WithDefaultErr() Option

func WithDefaultFlagDebug

func WithDefaultFlagDebug() Option

func WithDefaultOut

func WithDefaultOut() Option

func WithDefaultVersion

func WithDefaultVersion() Option

func WithFlagDebug

func WithFlagDebug(name, description string, persistent, ignoreDisableFlagParsing bool) Option

Jump to

Keyboard shortcuts

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