github.com/EagleQL/Xray-core@v1.4.3/main/commands/base/root.go (about) 1 package base 2 3 // RootCommand is the root command of all commands 4 var RootCommand *Command 5 6 func init() { 7 RootCommand = &Command{ 8 UsageLine: CommandEnv.Exec, 9 Long: "The root command", 10 } 11 } 12 13 // RegisterCommand register a command to RootCommand 14 func RegisterCommand(cmd *Command) { 15 RootCommand.Commands = append(RootCommand.Commands, cmd) 16 }