# Functions
Errorf logs error and set exit status to 1, but not exit.
Execute excute 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.
SortCommands sorts the first level sub 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 v2ray command like v2ray run or v2ray version.
CommandEnvHolder is a struct holds the environment info of commands.