From: Simon Ruderich Date: Sun, 9 May 2021 17:51:02 +0000 (+0200) Subject: rpc: replace append to sshOpts with assignment in DialSSH() X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=7fd48d68ef5a77fa9df8ad0251722ed35800e0f8;p=safcm%2Fsafcm.git rpc: replace append to sshOpts with assignment in DialSSH() sshOpts is empty by default and assigned only once. Don't suggest that this line is supposed to add to an existing value. --- diff --git a/rpc/dial.go b/rpc/dial.go index 0782ab0..909ec7e 100644 --- a/rpc/dial.go +++ b/rpc/dial.go @@ -51,7 +51,7 @@ func (c *Conn) DialSSH(user, host, sshConfig string) error { c.sshRemote = remote if sshConfig != "" { - c.sshOpts = append(c.sshOpts, "-F", sshConfig) + c.sshOpts = []string{"-F", sshConfig} } c.cmd = exec.Command("ssh", append(append([]string{}, c.sshOpts...),