MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / runHelp

Function runHelp

cmd/cql/internal/help.go:102–123  ·  view source on GitHub ↗
(cmd *Command, args []string)

Source from the content-addressed store, hash-verified

100}
101
102func runHelp(cmd *Command, args []string) {
103 if l := len(args); l != 1 {
104 if l > 1 {
105 // Don't support multiple commands
106 SetExitStatus(2)
107 }
108 MainUsage()
109 }
110
111 cmdName := args[0]
112 for _, command := range CqlCommands {
113 if command.Name() != cmdName {
114 continue
115 }
116 printCommandHelp(command)
117 return
118 }
119
120 //Not support command
121 SetExitStatus(2)
122 MainUsage()
123}
124
125// MainUsage prints cql base help
126func MainUsage() {

Callers

nothing calls this directly

Calls 4

SetExitStatusFunction · 0.85
MainUsageFunction · 0.85
printCommandHelpFunction · 0.85
NameMethod · 0.80

Tested by

no test coverage detected