From 5ff08bfbd82bf893c3e21a3ccd30612820f86c0e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 11:06:48 +0100 Subject: [PATCH] ax(ueps): align verifyError variable name with idiomatic err convention Comment on line 126 showed `err` but implementation used `verifyError`, violating AX Principle 2 (comment must match usage example) and Principle 1 (err is the RFC-sanctioned idiomatic name for local error variables). Co-Authored-By: Charon --- pkg/ueps/packet_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ueps/packet_test.go b/pkg/ueps/packet_test.go index 8933786..c63ca1a 100644 --- a/pkg/ueps/packet_test.go +++ b/pkg/ueps/packet_test.go @@ -138,8 +138,8 @@ func TestPacket_MarshalAndSign_Ugly(t *testing.T) { copy(corrupted, frame) corrupted[len(corrupted)-1] ^= 0xFF - _, verifyError := ReadAndVerify(bufio.NewReader(bytes.NewReader(corrupted)), sharedSecret) - if verifyError == nil { + _, err = ReadAndVerify(bufio.NewReader(bytes.NewReader(corrupted)), sharedSecret) + if err == nil { t.Error("expected HMAC integrity violation for corrupted frame, got nil") } }