From 27e7f6ef74d52ccd02ab91c9953216cdebea6bef Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 08:03:14 +0100 Subject: [PATCH] ax(node): replace prose description on validatePeerName with usage examples Co-Authored-By: Charon --- pkg/node/peer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/node/peer.go b/pkg/node/peer.go index 5977207..8f43f37 100644 --- a/pkg/node/peer.go +++ b/pkg/node/peer.go @@ -68,9 +68,9 @@ func safeKeyPrefix(key string) string { return key } -// validatePeerName checks if a peer name is valid. -// Peer names must be 1-64 characters, start and end with alphanumeric, -// and contain only alphanumeric, hyphens, underscores, and spaces. +// validatePeerName("my-worker") // nil +// validatePeerName("bad name!!!") // error: invalid characters +// validatePeerName("") // nil (empty names are optional) func validatePeerName(name string) error { if name == "" { return nil // Empty names are allowed (optional field)