package
0.0.0-20241118202920-e0a1d089f929
Repository: https://github.com/tractordev/toolkit-go.git
Documentation: pkg.go.dev

# Functions

ContextWithIO returns a child context with a ContextIO value added using the given Stdio equivalents.
ExactArgs returns an error if there are not exactly n args.
Execute takes a root Command plus arguments, finds the Command to run, parses flags, checks for expected arguments, and runs the Command.
Export wraps a function as a command.
MaxArgs returns an error if there are more than N args.
MinArgs returns an error if there is not at least N args.
RangeArgs returns an error if the number of args is not within the expected range.

# Variables

HelpFuncs are used by the help templating system.
HelpTemplate is a template used to generate help.

# Structs

Command is a command or subcommand that can be run with Execute.
CommandHelp wraps a Command to generate help.
No description provided by the author
Framework manages a root command, allowing Initializers to modify it, which by default runs a DefaultRunner.

# Interfaces

Initializer is a hook to allow units to customize the root Command.
No description provided by the author
Runner is a unit that takes over the program entrypoint.

# Type aliases

PositionalArgs is a function type used by the Command Args field for detecting whether the arguments match a given expectation.