mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +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:
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user