From df8f17c1cbd3f9fbe46c078fc8400cb888282acf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:34:58 +0100 Subject: [PATCH] ax(node): replace prose comment with usage example on ParseResponse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/node/protocol.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/node/protocol.go b/pkg/node/protocol.go index 119d420..8958f0d 100644 --- a/pkg/node/protocol.go +++ b/pkg/node/protocol.go @@ -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