Beispiel #1
0
func createTempPath() (string, error) {
	uuid := betterguid.New()
	date := time.Now().Format("2006-01-15")
	runPath := PathForCodeStorage + "/" + date + uuid

	err := os.Mkdir(runPath, 0777)
	if err != nil {
		return runPath, err
	}

	return runPath, nil
}
Beispiel #2
0
func createTempPath() string {
	uuid := betterguid.New()
	date := time.Now().Format("2006-01-15")
	runPath := PathForCodeStorage + "/" + date + uuid

	err := os.Mkdir(runPath, 0777)
	if err != nil {
		log.Print("Could not create temporary path: ", runPath)
		log.Print(err)
		return ""
	}

	return runPath
}