ax(ueps): remove duplicate usage-example comment on ParsedPacket

AX Principle 2 — comments as usage examples, not restatements.
ParsedPacket carried the identical dispatch example twice: once above
the type and again above ReadAndVerify. The type-level copy added no
new information; replaced with a field-reference note that describes
what the struct exposes without duplicating the call-site example.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 11:46:29 +01:00
parent 383c24d120
commit fe074699ad
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -17,8 +17,7 @@ var errMissingHMAC = packetError("UEPS packet missing HMAC signature")
// if err == errIntegrityViolation { /* HMAC mismatch — threat score incremented */ }
var errIntegrityViolation = packetError("integrity violation: HMAC mismatch (ThreatScore +100)")
// packet, err := ueps.ReadAndVerify(bufio.NewReader(conn), sharedSecret)
// if err == nil { dispatch(packet.Header.IntentID, packet.Header.ThreatScore, packet.Payload) }
// packet.Header.IntentID, packet.Header.ThreatScore, packet.Payload — fields populated after successful ReadAndVerify
type ParsedPacket struct {
Header UEPSHeader
Payload []byte