ax(ueps): expand MarshalAndSign comment to full usage example with error handling

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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 13:45:50 +01:00
parent af8f82f95a
commit ea40c035b5
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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)