MCPcopy Create free account
hub / github.com/cloudwan/gohan / Run

Function Run

cli/cli.go:53–81  ·  view source on GitHub ↗

Run execute main command

(name, usage string)

Source from the content-addressed store, hash-verified

51
52//Run execute main command
53func Run(name, usage string) {
54 app := cli.NewApp()
55 app.Name = name
56 app.Usage = usage
57 app.Flags = []cli.Flag{
58 cli.BoolFlag{Name: "debug, d", Usage: "Show debug messages"},
59 }
60 app.Before = parseGlobalOptions
61 app.Commands = []cli.Command{
62 getGohanClientCommand(),
63 getValidateCommand(),
64 getInitDbCommand(),
65 getConvertCommand(),
66 getServerCommand(),
67 getTestExtensionsCommand(),
68 getMigrateCommand(),
69 getResyncCommand(),
70 getTemplateCommand(),
71 getRunCommand(),
72 getTestCommand(),
73 getOpenAPICommand(),
74 getMarkdownCommand(),
75 getDotCommand(),
76 getGraceServerCommand(),
77 getGenerateCommand(),
78 getConverterCommand(),
79 }
80 app.Run(os.Args)
81}
82
83func parseGlobalOptions(c *cli.Context) (err error) {
84 //TODO(marcin) do it

Callers

nothing calls this directly

Calls 15

getGohanClientCommandFunction · 0.85
getValidateCommandFunction · 0.85
getInitDbCommandFunction · 0.85
getConvertCommandFunction · 0.85
getServerCommandFunction · 0.85
getTestExtensionsCommandFunction · 0.85
getMigrateCommandFunction · 0.85
getResyncCommandFunction · 0.85
getTemplateCommandFunction · 0.85
getRunCommandFunction · 0.85
getTestCommandFunction · 0.85
getOpenAPICommandFunction · 0.85

Tested by

no test coverage detected