From 871e6dd985ba5d75430a7e5ed89ea8071fc4bc76 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 10:55:02 +0100 Subject: [PATCH] ax(node): replace prose comment on DefaultTransportConfig with usage example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2: comments must show HOW with real values, not restate what the type signature already says. "returns sensible defaults" adds zero information — the concrete call pattern teaches agents exactly how to use it. Co-Authored-By: Charon --- pkg/node/transport.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/node/transport.go b/pkg/node/transport.go index 77fd0db..87cd846 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -38,7 +38,9 @@ type TransportConfig struct { PongTimeout time.Duration // Timeout waiting for pong } -// DefaultTransportConfig returns sensible defaults. +// cfg := node.DefaultTransportConfig() +// cfg.ListenAddr = ":9095" +// cfg.TLSCertPath = "/etc/lethean/tls.crt" func DefaultTransportConfig() TransportConfig { return TransportConfig{ ListenAddr: ":9091",