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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:51:58 +01:00
parent e4144c5f48
commit 66d925ab56
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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