ax(ueps): add usage-example comment to sentinelError type
sentinelError had no comment, violating AX Principle 2 (comments as usage examples). Added a concrete call-site example showing sentinel identity comparison pattern. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
cd8d17cc78
commit
fdbfbabe87
1 changed files with 2 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ import (
|
|||
// if err == errTLVValueTooLarge { /* value exceeded 255-byte TLV length limit */ }
|
||||
var errTLVValueTooLarge = sentinelError("TLV value too large for 1-byte length header")
|
||||
|
||||
// var errNotFound = sentinelError("thing not found")
|
||||
// if err == errNotFound { /* exact sentinel identity preserved across returns */ }
|
||||
type sentinelError string
|
||||
|
||||
func (sentinelErrorValue sentinelError) Error() string { return string(sentinelErrorValue) }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue