ax(ueps): rename buf→buffer in usage example comments
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled

Abbreviated names in comments teach agents bad patterns.
AX Principle 1 applies to usage examples too.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 08:37:35 +01:00
parent b18aa741ba
commit e65057e8af
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -8,7 +8,7 @@ import (
"io"
)
// writeTLV(buf, TagPayload, oversized) → errTLVValueTooLarge
// writeTLV(buffer, TagPayload, oversized) → errTLVValueTooLarge
// if errors.Is(err, errTLVValueTooLarge) { /* value exceeded 255-byte TLV length limit */ }
var errTLVValueTooLarge = tlvError("TLV value too large for 1-byte length header")
@ -107,8 +107,8 @@ func (builder *PacketBuilder) MarshalAndSign(sharedSecret []byte) ([]byte, error
return buffer.Bytes(), nil
}
// writeTLV(buf, TagVersion, []byte{0x09})
// writeTLV(buf, TagIntent, []byte{intentID})
// writeTLV(buffer, TagVersion, []byte{0x09})
// writeTLV(buffer, TagIntent, []byte{intentID})
func writeTLV(writer io.Writer, tag uint8, value []byte) error {
// Check strict length constraint (1 byte length = max 255 bytes)
if len(value) > 255 {