package
0.0.0-20241002170041-88591676c97d
Repository: https://github.com/gptlocal/netools.git
Documentation: pkg.go.dev
# Functions
Errorf logs error and set exit status to 1, but not exit.
Execute execute the commands.
Exit exits with code set with SetExitStatus().
ExitIfErrors exits if current status is not zero.
Fatalf logs error and exit with code 1.
GetExitStatus get exit status code.
Help implements the 'help' command.
PrintUsage prints usage of cmd to w.
RegisterCommand register a command to RootCommand.
SetExitStatus set exit status code.
Sort sorts the commands.
# Variables
CommandEnv holds the environment info of commands.
RootCommand is the root command of all commands.
SortLessFunc used for sort commands list, can be override from outside.
# Structs
A Command is an implementation of a netools command like netools run or netools version.
CommandEnvHolder is a struct holds the environment info of commands.