GODT-2013: CLI flag for frontend is required.

Other: removed --ni flag alias.
This commit is contained in:
Xavier Michelon
2022-10-15 08:19:27 +02:00
parent e55e893c94
commit 4bb29b1b5c
4 changed files with 36 additions and 16 deletions

View File

@ -69,12 +69,13 @@ const (
flagMemProfileShort = "m"
flagLogLevel = "log-level"
flagLogLevelShort = "l"
// FlagCLI indicate to start with command line interface.
FlagCLI = "cli"
flagCLIShort = "c"
flagRestart = "restart"
FlagLauncher = "launcher"
FlagNoWindow = "no-window"
FlagGRPC = "grpc" // FlagGRPC starts the gRPC frontend
FlagGRPCShort = "g"
FlagCLI = "cli" // FlagCLI indicate to start with command line interface.
flagCLIShort = "c"
flagRestart = "restart"
FlagLauncher = "launcher"
FlagNoWindow = "no-window"
)
type Base struct {
@ -299,6 +300,11 @@ func (b *Base) NewApp(mainLoop func(*Base, *cli.Context) error) *cli.App {
Aliases: []string{flagLogLevelShort},
Usage: "Set the log level (one of panic, fatal, error, warn, info, debug)",
},
&cli.BoolFlag{
Name: FlagGRPC,
Aliases: []string{FlagGRPCShort},
Usage: "Start the gRPC service",
},
&cli.BoolFlag{
Name: FlagCLI,
Aliases: []string{flagCLIShort},