mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
netclient: pass by value -> reference (#919)
* netclient: pass by value -> reference Updates various function arguments to accept config.ClientConfig as a reference to avoid deep copying the struct. Signed-off-by: John Sahhar <john@gravitl.com>
This commit is contained in:
@@ -28,7 +28,7 @@ func GetCommands(cliFlags []cli.Flag) []*cli.Command {
|
||||
err = errors.New("no server address provided")
|
||||
return err
|
||||
}
|
||||
err = command.Join(cfg, pvtKey)
|
||||
err = command.Join(&cfg, pvtKey)
|
||||
return err
|
||||
},
|
||||
},
|
||||
@@ -43,7 +43,7 @@ func GetCommands(cliFlags []cli.Flag) []*cli.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = command.Leave(cfg, c.String("force") == "yes")
|
||||
err = command.Leave(&cfg, c.String("force") == "yes")
|
||||
return err
|
||||
},
|
||||
},
|
||||
@@ -58,7 +58,7 @@ func GetCommands(cliFlags []cli.Flag) []*cli.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = command.Pull(cfg)
|
||||
err = command.Pull(&cfg)
|
||||
return err
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user