From 00d0e5ed967ea0b5d3348db8d4de97d6389db07e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:07:53 +0100 Subject: [PATCH] ax(ueps): replace variable placeholder with concrete value in writeTLV usage comment AX Principle 2 requires comments to show concrete usage with realistic values. The writeTLV comment used `intentID` (a variable name) as a placeholder rather than a real value; replaced with `0x01` and added error-capture pattern to show the full call site shape. Co-Authored-By: Charon --- pkg/ueps/packet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ueps/packet.go b/pkg/ueps/packet.go index a94abaf..1dce7a6 100644 --- a/pkg/ueps/packet.go +++ b/pkg/ueps/packet.go @@ -104,8 +104,8 @@ func (builder *PacketBuilder) MarshalAndSign(sharedSecret []byte) ([]byte, error return frameBuffer.Bytes(), nil } -// writeTLV(frameBuffer, TagVersion, []byte{0x09}) -// writeTLV(frameBuffer, TagIntent, []byte{intentID}) +// if err := writeTLV(buffer, TagVersion, []byte{0x09}); err != nil { return nil, err } +// if err := writeTLV(buffer, TagIntent, []byte{0x01}); err != nil { return nil, err } func writeTLV(writer io.Writer, tagType uint8, tagValue []byte) error { // writeTLV(writer, TagVersion, bytes.Repeat([]byte("x"), 256)) → errTLVValueTooLarge if len(tagValue) > 255 {