refactor: urfave v3

This commit is contained in:
2024-07-09 13:57:54 +02:00
parent 375e17a4a0
commit 1f8662cd95
336 changed files with 7332 additions and 25145 deletions
cli
go.modgo.sum
pkg/autocomplete
scripts/autocomplete
vendor
github.com
Azure
ProtonMail
beorn7
perks
quantile
cenkalti
containers
cpuguy83
davecgh
docker
emirpasic
gods
containers
lists
arraylist
utils
felixge
ghodss
go-git
gogo
google
hashicorp
go-cleanhttp
kballard
go-shellquote
kevinburke
ssh_config
lucasb-eyer
go-colorful
mattn
mgutz
ansi
miekg
pkcs11
opencontainers
pkg
pmezard
go-difflib
difflib
russross
sergi
go-diff
diffmatchpatch
sirupsen
spf13
theupdateframework
urfave
xeipuuv
xrash
go.opentelemetry.io
proto
otlp
metrics
trace
golang.org
x
sys
text
internal
language
language
google.golang.org
protobuf
internal
gopkg.in
gotest.tools
v3
internal
difflib
modules.txt

50
vendor/github.com/urfave/cli/v3/funcs.go generated vendored Normal file

@ -0,0 +1,50 @@
package cli
import "context"
// ShellCompleteFunc is an action to execute when the shell completion flag is set
type ShellCompleteFunc func(context.Context, *Command)
// BeforeFunc is an action that executes prior to any subcommands being run once
// the context is ready. If a non-nil error is returned, no subcommands are
// run.
type BeforeFunc func(context.Context, *Command) error
// AfterFunc is an action that executes after any subcommands are run and have
// finished. The AfterFunc is run even if Action() panics.
type AfterFunc func(context.Context, *Command) error
// ActionFunc is the action to execute when no subcommands are specified
type ActionFunc func(context.Context, *Command) error
// CommandNotFoundFunc is executed if the proper command cannot be found
type CommandNotFoundFunc func(context.Context, *Command, string)
// OnUsageErrorFunc is executed if a usage error occurs. This is useful for displaying
// customized usage error messages. This function is able to replace the
// original error messages. If this function is not set, the "Incorrect usage"
// is displayed and the execution is interrupted.
type OnUsageErrorFunc func(ctx context.Context, cmd *Command, err error, isSubcommand bool) error
// InvalidFlagAccessFunc is executed when an invalid flag is accessed from the context.
type InvalidFlagAccessFunc func(context.Context, *Command, string)
// ExitErrHandlerFunc is executed if provided in order to handle exitError values
// returned by Actions and Before/After functions.
type ExitErrHandlerFunc func(context.Context, *Command, error)
// FlagStringFunc is used by the help generation to display a flag, which is
// expected to be a single line.
type FlagStringFunc func(Flag) string
// FlagNamePrefixFunc is used by the default FlagStringFunc to create prefix
// text for a flag's full name.
type FlagNamePrefixFunc func(fullName []string, placeholder string) string
// FlagEnvHintFunc is used by the default FlagStringFunc to annotate flag help
// with the environment variable details.
type FlagEnvHintFunc func(envVars []string, str string) string
// FlagFileHintFunc is used by the default FlagStringFunc to annotate flag help
// with the file path details.
type FlagFileHintFunc func(filePath, str string) string