From fe074699ad212ea64b008fd0cb5ea011c931f268 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 11:46:29 +0100 Subject: [PATCH] ax(ueps): remove duplicate usage-example comment on ParsedPacket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/ueps/reader.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/ueps/reader.go b/pkg/ueps/reader.go index b6cc1fb..6a5d994 100644 --- a/pkg/ueps/reader.go +++ b/pkg/ueps/reader.go @@ -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