ax(node): replace prose comment with usage example on ParseResponse

AX Principle 2 — comments show HOW with real values, not what the
signature already says. The previous comment restated the method name
as prose; replaced with a concrete call pattern.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:34:58 +01:00
parent 822ac004ea
commit df8f17c1cb
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -41,8 +41,8 @@ func (h *ResponseHandler) ValidateResponse(resp *Message, expectedType MessageTy
return nil
}
// ParseResponse validates the response and parses the payload into the target.
// This combines ValidateResponse and ParsePayload into a single call.
// var stats StatsPayload
// if err := handler.ParseResponse(resp, MsgStats, &stats); err != nil { return nil, err }
func (h *ResponseHandler) ParseResponse(resp *Message, expectedType MessageType, target interface{}) error {
if err := h.ValidateResponse(resp, expectedType); err != nil {
return err