mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-08 14:15:25 +08:00
changed to lowercase
This commit is contained in:
parent
f272ef1022
commit
00787dd853
3 changed files with 17 additions and 4 deletions
|
@ -2,6 +2,7 @@ package cli_options
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/gravitl/netmaker/logger"
|
||||
"github.com/gravitl/netmaker/netclient/command"
|
||||
|
@ -105,6 +106,16 @@ func GetCommands(cliFlags []cli.Flag) []*cli.Command {
|
|||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "verbosity",
|
||||
Usage: "run netclient verb as daemon",
|
||||
Flags: cliFlags,
|
||||
Action: func(c *cli.Context) error {
|
||||
// set max verbosity for daemon regardless
|
||||
parseVerbosity(c)
|
||||
return nil
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,4 +129,6 @@ func parseVerbosity(c *cli.Context) {
|
|||
} else if c.Bool("VVV") {
|
||||
logger.Verbosity = 3
|
||||
}
|
||||
logger.Log(0, fmt.Sprintf("set verbosity to %d", logger.Verbosity))
|
||||
|
||||
}
|
||||
|
|
|
@ -206,19 +206,19 @@ func GetFlags(hostname string) []cli.Flag {
|
|||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "verbosity-level-1",
|
||||
Aliases: []string{"V"},
|
||||
Aliases: []string{"v"},
|
||||
Value: false,
|
||||
Usage: "Netclient Verbosity level 1.",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "verbosity-level-2",
|
||||
Aliases: []string{"VV"},
|
||||
Aliases: []string{"vv"},
|
||||
Value: false,
|
||||
Usage: "Netclient Verbosity level 2.",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "verbosity-level-3",
|
||||
Aliases: []string{"VVV"},
|
||||
Aliases: []string{"vvv"},
|
||||
Value: false,
|
||||
Usage: "Netclient Verbosity level 3.",
|
||||
},
|
||||
|
|
|
@ -24,7 +24,7 @@ func main() {
|
|||
app.Commands = cli_options.GetCommands(cliFlags[:])
|
||||
app.Description = "Used to perform interactions with Netmaker server and set local WireGuard config."
|
||||
app.Usage = "Netmaker's netclient agent and CLI."
|
||||
app.UsageText = "netclient [global options] command [command options] [arguments...]. Adjust verbosity of given command with -V, -VV or -VVV (max)."
|
||||
app.UsageText = "netclient [global options] command [command options] [arguments...]. Adjust verbosity of given command with -v, -vv or -vvv (max)."
|
||||
|
||||
setGarbageCollection()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue