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:
john s
2022-03-20 23:43:17 -05:00
committed by GitHub
parent eb974dbd63
commit 24f292c934
6 changed files with 21 additions and 19 deletions
+3 -3
View File
@@ -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
},
},