mirror of
https://github.com/gravitl/netmaker.git
synced 2026-01-07 03:14:03 +08:00
removed unneccesary check
This commit is contained in:
parent
30a40aaed6
commit
fc5fc3d381
2 changed files with 6 additions and 3 deletions
|
|
@ -6,6 +6,9 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// Verbosity - current logging verbosity of netclient
|
||||
var Verbosity = 0
|
||||
|
||||
// MakeString - makes a string using golang string builder
|
||||
func MakeString(delimeter string, message ...string) string {
|
||||
var builder strings.Builder
|
||||
|
|
@ -19,6 +22,9 @@ func MakeString(delimeter string, message ...string) string {
|
|||
}
|
||||
|
||||
func getVerbose() int32 {
|
||||
if Verbosity >= 1 && Verbosity <= 3 {
|
||||
return int32(Verbosity)
|
||||
}
|
||||
level, err := strconv.Atoi(os.Getenv("VERBOSITY"))
|
||||
if err != nil || level < 0 {
|
||||
level = 0
|
||||
|
|
|
|||
|
|
@ -167,9 +167,6 @@ func ReplaceWithBackup(network string) error {
|
|||
// GetCLIConfig - gets the cli flags as a config
|
||||
func GetCLIConfig(c *cli.Context) (ClientConfig, string, error) {
|
||||
var cfg ClientConfig
|
||||
if c.String("version") != "" {
|
||||
return cfg, c.String("version"), nil
|
||||
}
|
||||
if c.String("token") != "" {
|
||||
tokenbytes, err := base64.StdEncoding.DecodeString(c.String("token"))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue