aboutsummaryrefslogtreecommitdiff
path: root/ssh/client_auth_test.go
diff options
context:
space:
mode:
authorNicola Murino <nicola.murino@gmail.com>2025-09-14 15:28:12 +0200
committerNicola Murino <nicola.murino@gmail.com>2025-09-15 23:33:16 -0700
commitddb4e80c6ad38c8a94001924a6ff8424f5cae369 (patch)
treee7fe81070868398a4851433a840b75ff476e8fd9 /ssh/client_auth_test.go
parentf4d47b0db5875e61dd52acdb63be800177ab48bb (diff)
downloadgo-x-crypto-ddb4e80c6ad38c8a94001924a6ff8424f5cae369.tar.xz
ssh: remove custom contains, use slices.Contains
Change-Id: If4784469e7285675bdd51399a76bdc16f0036a2e Reviewed-on: https://go-review.googlesource.com/c/crypto/+/703635 Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'ssh/client_auth_test.go')
-rw-r--r--ssh/client_auth_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh/client_auth_test.go b/ssh/client_auth_test.go
index 8d1767c..e398c40 100644
--- a/ssh/client_auth_test.go
+++ b/ssh/client_auth_test.go
@@ -14,6 +14,7 @@ import (
"net"
"os"
"runtime"
+ "slices"
"strings"
"testing"
)
@@ -1214,7 +1215,7 @@ func (cb configurablePublicKeyCallback) auth(session []byte, user string, c pack
if err != nil {
return authFailure, nil, err
}
- if success == authSuccess || !contains(methods, cb.method()) {
+ if success == authSuccess || !slices.Contains(methods, cb.method()) {
return success, methods, err
}