simplify commands and version handling
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
5b70d46213
commit
23e7a8ffab
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user