update all sub commands

This commit is contained in:
A.Unger committed 2020-03-17 15:01:09 +01:00
1 parent 076383e79d
commit 74fd634a2b
7 files changed
+39 -54

No files matched your search

+4 -5
View File
@@ -16,15 +16,14 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
Usage: "Start proxy server",
Category: "Extensions",
Flags: flagset.ServerWithConfig(cfg.Proxy),
Action: func(c *cli.Context) error {
serverConfig := configureProxy(cfg)
serverCommand := command.Server(serverConfig)
Action: func(ctx *cli.Context) error {
proxyCommand := command.Server(configureProxy(cfg))
if err := serverCommand.Before(c); err != nil {
if err := proxyCommand.Before(ctx); err != nil {
return err
}
return cli.HandleAction(serverCommand.Action, c)
return cli.HandleAction(proxyCommand.Action, ctx)
},
}
}