How to remove all contents of a directory using Golang?

Simply do:

os.RemoveAll("/tmp/")
os.MkdirAll("/tmp/",FileMode)

Leave a Comment