linter fixes.

This commit is contained in:
2025-11-16 18:39:18 -08:00
parent 0dcd18c6f1
commit c999bf35b0
4 changed files with 10 additions and 9 deletions

View File

@@ -52,10 +52,11 @@ func TestHotpBadRFC(t *testing.T) {
otp := NewHOTP(testKey, 0, 6)
for i := 0; i < len(rfcHotpExpected); i++ {
code := otp.OTP()
if code == "" {
switch code {
case "":
fmt.Printf("twofactor: failed to produce an OTP\n")
t.FailNow()
} else if code == rfcHotpExpected[i] {
case rfcHotpExpected[i]:
fmt.Printf("twofactor: should not have received a valid OTP\n")
t.FailNow()
}