Documentation
¶
Overview ¶
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
Index ¶
- Variables
- func As[T any](in any) T
- func Children(children ...*cobra.Command) opt.Option[*Command]
- func Feat() opt.Option[*Command]
- func Hide() opt.Option[*Command]
- func Parent(p *cobra.Command) opt.Option[*Command]
- func SetArgs(flags *pflag.FlagSet, prefix string, args Args) error
- func WithArgs(prefix string, a Args) opt.Option[*Command]
- func WithLogger(l *slog.Logger) opt.Option[*Command]
- type Arg
- type Args
- type Command
- type Docs
- type Execute
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLogger = errors.New("cli: invalid logger specified")
ErrInvalidLogger is returned by WithLogger when a nil *slog.Logger is supplied.
View Source
var ErrUnknownType = fmt.Errorf("unknown type")
Functions ¶
Types ¶
type Arg ¶
type Arg struct {
Short string `json:"short" yaml:"short"` // one-letter abbreviated flag
Value any `json:"value" yaml:"value"`
Deprecated bool `json:"deprecated" yaml:"deprecated"`
Replacement string `json:"replacement" yaml:"replacement"`
Description string `json:"description" yaml:"description"`
Required bool `json:"required" yaml:"required"`
GetFN func() any
}
type Command ¶
type Command struct {
*cobra.Command
Args Args
Docs Docs
// contains filtered or unexported fields
}
func NewCommand ¶
Click to show internal directories.
Click to hide internal directories.