mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 09:22:42 +08:00
add network name from cli
This commit is contained in:
@@ -150,7 +150,7 @@ func Connect(cfg config.ClientConfig) error {
|
|||||||
if networkName == "" {
|
if networkName == "" {
|
||||||
networkName = cfg.Node.Network
|
networkName = cfg.Node.Network
|
||||||
}
|
}
|
||||||
if networkName == "" {
|
if networkName == "all" {
|
||||||
return fmt.Errorf("no network specified")
|
return fmt.Errorf("no network specified")
|
||||||
}
|
}
|
||||||
return functions.Connect(networkName)
|
return functions.Connect(networkName)
|
||||||
@@ -162,7 +162,7 @@ func Disconnect(cfg config.ClientConfig) error {
|
|||||||
if networkName == "" {
|
if networkName == "" {
|
||||||
networkName = cfg.Node.Network
|
networkName = cfg.Node.Network
|
||||||
}
|
}
|
||||||
if networkName == "" {
|
if networkName == "all" {
|
||||||
return fmt.Errorf("no network specified")
|
return fmt.Errorf("no network specified")
|
||||||
}
|
}
|
||||||
return functions.Disconnect(networkName)
|
return functions.Disconnect(networkName)
|
||||||
|
Reference in New Issue
Block a user