ax(ueps): rename remaining to payloadBytes for semantic clarity
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 1: names should convey semantic meaning, not implementation
perspective. `remaining` describes a buffer operation; `payloadBytes`
describes what the data IS — the packet payload content.

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

View file

@ -44,11 +44,11 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
if tagByte == TagPayload {
// Payload is length-prefixless; caller frames the stream.
// HMAC covers signedData (header TLVs) + raw payload bytes, not the 0xFF tag.
remaining, err := io.ReadAll(reader)
payloadBytes, err := io.ReadAll(reader)
if err != nil {
return nil, err
}
payload = remaining
payload = payloadBytes
break
}