cli: refactor to allow definition of subcommands next to their implementation

This commit is contained in:
Christian Schwarz
2018-10-13 15:07:50 +02:00
parent aeb87ffbcf
commit 5c3c83b2cb
9 changed files with 255 additions and 191 deletions

View File

@ -1,7 +1,16 @@
package daemon
import (
"github.com/zrepl/zrepl/cli"
"github.com/zrepl/zrepl/logger"
)
type Logger = logger.Logger
var DaemonCmd = &cli.Subcommand {
Use: "daemon",
Short: "run the zrepl daemon",
Run: func(subcommand *cli.Subcommand, args []string) error {
return Run(subcommand.Config())
},
}