From 7fd48d68ef5a77fa9df8ad0251722ed35800e0f8 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 9 May 2021 19:51:02 +0200 Subject: [PATCH] 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. --- rpc/dial.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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...), -- 2.43.2