Run execute main command
(name, usage string)
| 51 | |
| 52 | //Run execute main command |
| 53 | func 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 | |
| 83 | func parseGlobalOptions(c *cli.Context) (err error) { |
| 84 | //TODO(marcin) do it |
nothing calls this directly
no test coverage detected