ax(ueps): remove redundant err shadow in ReadAndVerify payload branch

The inner scope re-declared `var err error` immediately before assigning
from `io.ReadAll`, unnecessarily shadowing the `err` already in scope from
`reader.ReadByte()`.  Removing the shadow simplifies the control flow and
eliminates the redundant declaration (AX Principle 1 — names should not
introduce unnecessary cognitive overhead).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:39:30 +01:00
parent 22a74415f3
commit 0ab8c0fe7d
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -39,7 +39,6 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
}
if tagByte == TagPayload {
var err error
payload, err = io.ReadAll(reader)
if err != nil {
return nil, err