From be4d3888606e38717a29ecfd78f7e72e4f126263 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 12:31:03 +0100 Subject: [PATCH] ax(ueps): fix inaccurate default-case comment in ReadAndVerify MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comment showed Write([]byte{...}) but code uses WriteByte — misleading concrete example violates AX Principle 2 (comments as accurate usage examples). Co-Authored-By: Charon --- pkg/ueps/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ueps/reader.go b/pkg/ueps/reader.go index 2c4ea3b..eeec07f 100644 --- a/pkg/ueps/reader.go +++ b/pkg/ueps/reader.go @@ -84,7 +84,7 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er case TagHMAC: hmacSignature = tagValue default: - // hmacInputBuffer.Write([]byte{tagType, tagValueLength}); hmacInputBuffer.Write(tagValue) — unknown tags included in HMAC + // hmacInputBuffer.WriteByte(tagType); hmacInputBuffer.WriteByte(tagValueLength); hmacInputBuffer.Write(tagValue) hmacInputBuffer.WriteByte(tagType) hmacInputBuffer.WriteByte(tagValueLength) hmacInputBuffer.Write(tagValue)