ax(ueps): replace blank-identifier discards with realistic dispatch example
ParsedPacket comment used `_ = packet.Header.IntentID` — a discard pattern that is not a realistic usage example (AX-2 violation). Replaced with `dispatch(packet.Header.IntentID, packet.Header.ThreatScore, packet.Payload)` to show how callers actually consume the parsed packet fields. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
068f951477
commit
559e63b0a9
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ var errMissingHMAC = packetError("UEPS packet missing HMAC signature")
|
|||
var errIntegrityViolation = packetError("integrity violation: HMAC mismatch (ThreatScore +100)")
|
||||
|
||||
// packet, err := ueps.ReadAndVerify(bufio.NewReader(conn), sharedSecret)
|
||||
// if err == nil { _ = packet.Header.IntentID; _ = packet.Header.ThreatScore; _ = packet.Payload }
|
||||
// if err == nil { dispatch(packet.Header.IntentID, packet.Header.ThreatScore, packet.Payload) }
|
||||
type ParsedPacket struct {
|
||||
Header UEPSHeader
|
||||
Payload []byte
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue