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:
parent
25557e0208
commit
a6eb29a486
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue