ax(node): replace prose comment with usage example on extractTarball

RFC-025 Principle 2 — comments must show a concrete call with realistic
values, not restate what the signature already says.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 11:20:01 +01:00
parent 25557e0208
commit a6eb29a486
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -255,7 +255,8 @@ func createTarball(files map[string][]byte) ([]byte, error) {
return buffer.Bytes(), nil
}
// extractTarball extracts a tar archive to a directory, returns first executable found.
// minerPath, err := extractTarball(tarData, "/tmp/miners/xmrig")
// if err != nil { return "", nil, err }
func extractTarball(tarData []byte, destDir string) (string, error) {
// Ensure destDir is an absolute, clean path for security checks
absDestDir, err := filepath.Abs(destDir)