Discover Packages
ytils.dev/cli
package
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Feb 12, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
ErrFailure can be returned from a command to trigger a non-zero exit code with no extra message.
func ParseExecute[T any ]() *T
type Commander interface {
Execute(args []string ) error
}
Commander is a required interface for CLI commands.
type Initer[T any ] interface {
Init(app *T) error
}
Initer is an optional interface for commands that require global flags.
The command can read the global values and store them to be later used in Execute.
type Validator interface {
Validate() error
}
Validator is an optional interface for commands that require additional validation of their flags.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.