From 557c4c58b3bcdbc05b62ebdbb5fb0c647ef48ae2 Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Thu, 7 Oct 2021 10:20:58 +0200 Subject: [PATCH] export RemainingAttempts --- command_set.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command_set.go b/command_set.go index 93cb271..e78f575 100644 --- a/command_set.go +++ b/command_set.go @@ -16,11 +16,11 @@ import ( var ErrNoAvailablePairingSlots = errors.New("no available pairing slots") type WrongPINError struct { - remainingAttempts int + RemainingAttempts int } func (e *WrongPINError) Error() string { - return fmt.Sprintf("wrong pin. remaining attempts: %d", e.remainingAttempts) + return fmt.Sprintf("wrong pin. remaining attempts: %d", e.RemainingAttempts) } type CommandSet struct { @@ -190,7 +190,7 @@ func (cs *CommandSet) VerifyPIN(pin string) error { if resp.Sw&0x63C0 == 0x63C0 { remainingAttempts := resp.Sw & 0x000F return &WrongPINError{ - remainingAttempts: int(remainingAttempts), + RemainingAttempts: int(remainingAttempts), } } return err