From 413d735abf5b6a7f50ee93fedcb35d083da0367b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:10:42 +0100 Subject: [PATCH] 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 --- pkg/ueps/packet.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/ueps/packet.go b/pkg/ueps/packet.go index 931a422..c53d554 100644 --- a/pkg/ueps/packet.go +++ b/pkg/ueps/packet.go @@ -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"