MCPcopy
hub / github.com/google/gvisor / printTopLevelHelp

Method printTopLevelHelp

runsc/cli/help.go:102–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100}
101
102func (h *Help) printTopLevelHelp() {
103 fmt.Fprintf(h.cdr.Output, "Usage: %s <flags> <subcommand> <subcommand args>\n\n", h.cdr.Name())
104 fmt.Fprintf(h.cdr.Output, `runsc is the gVisor container runtime.
105
106Functionality is provided by subcommands. For help with a specific subcommand,
107use "%s %s <subcommand>".
108
109`, h.cdr.Name(), h.Name())
110 h.cdr.VisitGroups(func(g *subcommands.CommandGroup) {
111 h.cdr.ExplainGroup(h.cdr.Output, g)
112 })
113
114 fmt.Fprintf(h.cdr.Output, "Additional help topics (Use \"%s %s <topic>\" to see help on the topic):\n", h.cdr.Name(), h.Name())
115 for _, cmd := range h.commands {
116 fmt.Fprintf(h.cdr.Output, "\t%-15s %s\n", cmd.Name(), cmd.Synopsis())
117 }
118 fmt.Fprintf(h.cdr.Output, "\nUse \"%s flags\" for a list of top-level flags\n", h.cdr.Name())
119}
120
121// Register registers a new help command.
122func (h *Help) Register(cmd subcommands.Command) {

Callers 2

ExecuteMethod · 0.95
RunFunction · 0.95

Calls 3

NameMethod · 0.95
NameMethod · 0.65
SynopsisMethod · 0.45

Tested by

no test coverage detected