1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package backend import ( "log" "os" "path" "path/filepath" ) func cleanupTempDirs() { dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) for _, d := range dirs { log.Println("removing temp dir:", d) os.RemoveAll(d) } }