ax(node): replace prose comment with usage example on createTarball
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 2 — comments show HOW with real values, not WHAT the
signature already says. The previous comment restated the function
signature in prose; replaced with a concrete call showing filename/
content pairs.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 13:49:16 +01:00
parent b55b2dd945
commit 22b6e8ace6
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -206,7 +206,8 @@ func isJSON(data []byte) bool {
return data[0] == '{' || data[0] == '['
}
// createTarball creates a tar archive from a map of filename -> content.
// tarData, err := createTarball(map[string][]byte{"xmrig": binaryData, "config.json": cfgData})
// if err != nil { return nil, err }
func createTarball(files map[string][]byte) ([]byte, error) {
var buffer bytes.Buffer
tarWriter := tar.NewWriter(&buffer)