Created
February 28, 2018 16:07
-
-
Save clementlecorre/af59cd5c2976a12042587ae32e038ed6 to your computer and use it in GitHub Desktop.
Lazy directory removal with golang (ending with / signifies that it's a directory)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func RemoveDirectoryRecursively(dir string) error { | |
return os.RemoveAll(dir+"/") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment