setting cli flags to proper commands (#860)

This commit is contained in:
pascal-fischer
2023-05-29 13:52:22 +02:00
committed by GitHub
parent 4fcf176a39
commit 0fa3abbec0
9 changed files with 88 additions and 34 deletions

View File

@@ -18,6 +18,11 @@ type program struct {
serv *grpc.Server
}
func init() {
serviceCmd.AddCommand(runCmd, startCmd, stopCmd, restartCmd) // service control commands are subcommands of service
serviceCmd.AddCommand(installCmd, uninstallCmd) // service installer commands are subcommands of service
}
func newProgram(ctx context.Context, cancel context.CancelFunc) *program {
ctx = internal.CtxInitState(ctx)
return &program{ctx: ctx, cancel: cancel}