1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 07:51:32 +05:30

pass: fix QF1001 (staticcheck)

pass/pass_test.go:86:6: QF1001: could apply De Morgan's law (staticcheck)
            if !(strings.HasSuffix(server, "2376/v1") || strings.HasSuffix(server, "2375/v1")) {
               ^
    pass/pass_test.go:89:6: QF1001: could apply De Morgan's law (staticcheck)
            if !(username == "foo" || username == "bar") {
               ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-01 15:34:50 +02:00
parent d378d46316
commit 860f1459e3
+2 -2
View File
@@ -83,10 +83,10 @@ func TestPassHelperList(t *testing.T) {
t.Error(err)
}
for server, username := range credsList {
if !(strings.HasSuffix(server, "2376/v1") || strings.HasSuffix(server, "2375/v1")) {
if !strings.HasSuffix(server, "2376/v1") && !strings.HasSuffix(server, "2375/v1") {
t.Errorf("invalid url: %s", server)
}
if !(username == "foo" || username == "bar") {
if username != "foo" && username != "bar" {
t.Errorf("invalid username: %v", username)
}