simplify commands and version handling

This commit is contained in:
Willy Kloucek
2022-01-07 16:11:50 +00:00
committed by Jörn Friedrich Dreyer
parent 5b70d46213
commit 23e7a8ffab
42 changed files with 873 additions and 499 deletions
+1 -7
View File
@@ -13,9 +13,6 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
Name: "proxy",
Usage: "Start proxy server",
Category: "Extensions",
Subcommands: []*cli.Command{
command.PrintVersion(cfg.Proxy),
},
Before: func(ctx *cli.Context) error {
if err := ParseConfig(ctx, cfg); err != nil {
return err
@@ -27,10 +24,7 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
return nil
},
Action: func(c *cli.Context) error {
origCmd := command.Server(cfg.Proxy)
return handleOriginalAction(c, origCmd)
},
Subcommands: command.GetCommands(cfg.Proxy),
}
}