From 66d925ab560bf85debad5030f8ccb98bed66b7d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:51:58 +0100 Subject: [PATCH] ax(node): replace prose comment with usage examples on isJSON AX Principle 2: comments must show how to call the function, not restate what the type signature already says. Co-Authored-By: Charon --- pkg/node/bundle.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/node/bundle.go b/pkg/node/bundle.go index e50eae5..00dfbae 100644 --- a/pkg/node/bundle.go +++ b/pkg/node/bundle.go @@ -196,7 +196,8 @@ func calculateChecksum(data []byte) string { return hex.EncodeToString(hash[:]) } -// isJSON checks if data starts with JSON characters. +// if isJSON(bundle.Data) { return bundle.Data, nil } // skip decrypt for plain profiles +// if isJSON(content) { mode = 0644 } else { mode = 0755 } // executable unless JSON func isJSON(data []byte) bool { if len(data) == 0 { return false