ax(ueps): replace fictional sentinel example with concrete package sentinel
AX Principle 2 — comments must show realistic usage with actual values from the codebase, not placeholder examples. The sentinelError type comment used errNotFound (a fictional variable) instead of errTLVValueTooLarge (the actual sentinel declared on the next line). Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
8d1e007d69
commit
a84d999984
1 changed files with 2 additions and 2 deletions
|
|
@ -12,8 +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 */ }
|
||||
// var errTLVValueTooLarge = sentinelError("TLV value too large for 1-byte length header")
|
||||
// if err == errTLVValueTooLarge { /* value exceeded 255-byte TLV length limit */ }
|
||||
type sentinelError string
|
||||
|
||||
// var e sentinelError = "thing not found"; e.Error() == "thing not found"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue