Reorder cmd groups

Also fixed gofer which was added twice.

PiperOrigin-RevId: 425709601
This commit is contained in:
Fabricio Voznika
2022-02-01 14:03:11 -08:00
committed by gVisor bot
parent 0f8db423e2
commit 5a642df6b3
4 changed files with 20 additions and 21 deletions
+17 -18
View File
@@ -59,47 +59,46 @@ var (
func Main(version string) {
// Help and flags commands are generated automatically.
help := cmd.NewHelp(subcommands.DefaultCommander)
help.Register(new(cmd.Syscalls))
help.Register(new(cmd.Platforms))
help.Register(new(cmd.Syscalls))
subcommands.Register(help, "")
subcommands.Register(subcommands.FlagsCommand(), "")
// Installation helpers.
const helperGroup = "helpers"
subcommands.Register(new(cmd.Install), helperGroup)
subcommands.Register(new(cmd.Uninstall), helperGroup)
// Register user-facing runsc commands.
// Register OCI user-facing runsc commands.
subcommands.Register(new(cmd.Checkpoint), "")
subcommands.Register(new(cmd.Create), "")
subcommands.Register(new(cmd.Delete), "")
subcommands.Register(new(cmd.Do), "")
subcommands.Register(new(cmd.Events), "")
subcommands.Register(new(cmd.Exec), "")
subcommands.Register(new(cmd.Gofer), "")
subcommands.Register(new(cmd.Kill), "")
subcommands.Register(new(cmd.List), "")
subcommands.Register(new(cmd.Pause), "")
subcommands.Register(new(cmd.PS), "")
subcommands.Register(new(cmd.Pause), "")
subcommands.Register(new(cmd.Restore), "")
subcommands.Register(new(cmd.Resume), "")
subcommands.Register(new(cmd.Run), "")
subcommands.Register(new(cmd.Spec), "")
subcommands.Register(new(cmd.State), "")
subcommands.Register(new(cmd.Start), "")
subcommands.Register(new(cmd.Symbolize), "")
subcommands.Register(new(cmd.Wait), "")
subcommands.Register(new(cmd.Mitigate), "")
subcommands.Register(new(cmd.State), "")
subcommands.Register(new(cmd.VerityPrepare), "")
subcommands.Register(new(cmd.Wait), "")
// Register internal commands with the internal group name. This causes
// them to be sorted below the user-facing commands with empty group.
// The string below will be printed above the commands.
// Installation helpers.
const helperGroup = "helpers"
subcommands.Register(new(cmd.Install), helperGroup)
subcommands.Register(new(cmd.Mitigate), helperGroup)
subcommands.Register(new(cmd.Uninstall), helperGroup)
const debugGroup = "debug"
subcommands.Register(new(cmd.Debug), debugGroup)
subcommands.Register(new(cmd.Statefile), debugGroup)
subcommands.Register(new(cmd.Symbolize), debugGroup)
// Internal commands.
const internalGroup = "internal use only"
subcommands.Register(new(cmd.Boot), internalGroup)
subcommands.Register(new(cmd.Debug), internalGroup)
subcommands.Register(new(cmd.Gofer), internalGroup)
subcommands.Register(new(cmd.Statefile), internalGroup)
config.RegisterFlags()
+1 -1
View File
@@ -115,7 +115,7 @@ func (*Boot) Name() string {
// Synopsis implements subcommands.Command.Synopsis.
func (*Boot) Synopsis() string {
return "launch a sandbox process (internal use only)"
return "launch a sandbox process"
}
// Usage implements subcommands.Command.Usage.
+1 -1
View File
@@ -72,7 +72,7 @@ func (*Gofer) Name() string {
// Synopsis implements subcommands.Command.
func (g *Gofer) Synopsis() string {
return fmt.Sprintf("launch a gofer process that serves files over the protocol (9P or lisafs) defined in the config (internal use only)")
return fmt.Sprintf("launch a gofer process that proxies access to container files")
}
// Usage implements subcommands.Command.
+1 -1
View File
@@ -30,7 +30,7 @@ import (
"gvisor.dev/gvisor/runsc/flag"
)
// List implements subcommands.Command for the "list" command for the "list" command.
// List implements subcommands.Command for the "list" command.
type List struct {
quiet bool
format string