Implement atexit.rmtree

This commit is contained in:
Kovid Goyal
2025-01-05 11:04:23 +05:30
parent 0d5bcff353
commit 25cb73511f
2 changed files with 13 additions and 0 deletions

View File

@@ -44,6 +44,11 @@ func main() (rc int, err error) {
fmt.Fprintln(os.Stderr, "Failed to remove:", rest, "with error:", err)
rc = 1
}
case "rmtree":
if err := os.RemoveAll(rest); err != nil {
fmt.Fprintln(os.Stderr, "Failed to remove:", rest, "with error:", err)
rc = 1
}
}
}
}