The switch in ReadAndVerify duplicated the same three hmacInputBuffer.WriteByte/Write calls across five cases plus default. Extracted to a single conditional after the switch: all tags except TagHMAC feed the authenticated input buffer. Behaviour is identical; declarative intent is now clear (AX principle 5 — declarative over imperative). Co-Authored-By: Charon <charon@lethean.io> |
||
|---|---|---|
| .. | ||
| packet.go | ||
| packet_test.go | ||
| reader.go | ||
| reader_test.go | ||