Cleaner for Go
go get github.com/manen/cleaner
package main
import (
"github.com/manen/cleaner"
)
func main() {
// Create a new cleaner
c := cleaner.Cleaner{
Name: "Example",
CleanUp: func() {
// Clean up
}
}
// Add the new cleaner
cleaner.AddCleaner(c)
// Run all the cleaners
cleaner.CleanUp()
}