Skip to content

Commit 860f145

Browse files
committed
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 <[email protected]>
1 parent d378d46 commit 860f145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pass/pass_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ func TestPassHelperList(t *testing.T) {
8383
t.Error(err)
8484
}
8585
for server, username := range credsList {
86-
if !(strings.HasSuffix(server, "2376/v1") || strings.HasSuffix(server, "2375/v1")) {
86+
if !strings.HasSuffix(server, "2376/v1") && !strings.HasSuffix(server, "2375/v1") {
8787
t.Errorf("invalid url: %s", server)
8888
}
89-
if !(username == "foo" || username == "bar") {
89+
if username != "foo" && username != "bar" {
9090
t.Errorf("invalid username: %v", username)
9191
}
9292

0 commit comments

Comments
 (0)