// Delete temp log dir after tests. func teardownLoggerTest(config *models.Config) { absLogDir := config.AbsLogDirectory() if fileutil.LooksSafeToDelete(absLogDir, 12, 3) { // Don't call remove all on "/" or "/usr" or anything like that. os.RemoveAll(absLogDir) } else { fmt.Printf("Not deleting log dir '%s' because it looks dangerous.\n"+ "Delete that manually, if you thing it's safe.\n", absLogDir) } }