Skip to content

Commit 83039c2

Browse files
committed
Revert "chore: Remove unused equality func"
This reverts commit f2f4a83.
1 parent bbfa8f2 commit 83039c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cli/configssh.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ func (o sshCoderConfigOptions) isZero() bool {
6565
return o.sshConfigFile == sshDefaultConfigFileName && len(o.sshOptions) == 0
6666
}
6767

68+
func (o sshCoderConfigOptions) equal(other sshCoderConfigOptions) bool {
69+
// Compare without side-effects or regard to order.
70+
opt1 := slices.Clone(o.sshOptions)
71+
sort.Strings(opt1)
72+
opt2 := slices.Clone(other.sshOptions)
73+
sort.Strings(opt2)
74+
return o.sshConfigFile == other.sshConfigFile && slices.Equal(opt1, opt2)
75+
}
76+
6877
func (o sshCoderConfigOptions) asArgs() (args []string) {
6978
if o.sshConfigFile != sshDefaultConfigFileName {
7079
args = append(args, "--ssh-config-file", o.sshConfigFile)

0 commit comments

Comments
 (0)