From ea40c035b598a6804f75442c4c80949ae6ef9e52 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:45:50 +0100 Subject: [PATCH] ax(ueps): expand MarshalAndSign comment to full usage example with error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2: comments show concrete usage with realistic values, not minimal call-site only. Single-line comment omitted error handling and downstream use — now shows the complete call pattern. Co-Authored-By: Charon --- pkg/ueps/packet.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/ueps/packet.go b/pkg/ueps/packet.go index b93dc05..c7757ae 100644 --- a/pkg/ueps/packet.go +++ b/pkg/ueps/packet.go @@ -61,6 +61,8 @@ func NewPacketBuilder(intentID uint8, payload []byte) *PacketBuilder { } // frame, err := builder.MarshalAndSign([]byte("my-shared-secret")) +// if err != nil { return nil, err } +// conn.Write(frame) // send signed frame over network func (builder *PacketBuilder) MarshalAndSign(sharedSecret []byte) ([]byte, error) { frameBuffer := new(bytes.Buffer)