Skip to content

Commit b5a6cba

Browse files
committed
refactor: remove unreachable fallback code in DetectType
The NTAGTypeUnknown fallback was dead code - detectTypeFromCapabilityContainer always returns a valid type for valid CC data (it guesses based on size ranges).
1 parent 4433c3a commit b5a6cba

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

ntag.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,12 +1102,6 @@ func (t *NTAGTag) DetectType(ctx context.Context) error {
11021102
// target selection issues on marginal RF connections
11031103
t.tagType = t.detectTypeFromCapabilityContainer(ccData)
11041104

1105-
if t.tagType == NTAGTypeUnknown {
1106-
// Final fallback to conservative choice
1107-
Debugf("NTAG DetectType: CC-based detection returned unknown, defaulting to NTAG213")
1108-
t.tagType = NTAGType213 // Use smallest variant for safety
1109-
}
1110-
11111105
return nil
11121106
}
11131107

0 commit comments

Comments
 (0)