ax(ueps): replace duplicate usage comment on sentinelError type
The comment on `sentinelError` restated the `errTLVValueTooLarge` declaration directly above it (AX principle 2 violation). Replaced with a distinct concrete example showing how to define any sentinel of this type. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
a84d999984
commit
413d735abf
1 changed files with 1 additions and 2 deletions
|
|
@ -12,8 +12,7 @@ import (
|
|||
// if err == errTLVValueTooLarge { /* value exceeded 255-byte TLV length limit */ }
|
||||
var errTLVValueTooLarge = sentinelError("TLV value too large for 1-byte length header")
|
||||
|
||||
// var errTLVValueTooLarge = sentinelError("TLV value too large for 1-byte length header")
|
||||
// if err == errTLVValueTooLarge { /* value exceeded 255-byte TLV length limit */ }
|
||||
// var errNotFound = sentinelError("record not found"); if err == errNotFound { /* handle */ }
|
||||
type sentinelError string
|
||||
|
||||
// var e sentinelError = "thing not found"; e.Error() == "thing not found"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue