func verifyName(name string, confFile *stash.Config) { if confFile.IsDuplicateEntry(stash.ConfigEntry{Name: name}) { color.Red("Attempted to add duplicate entry [%s], "+ "if you were trying to add folders to an existing backup "+ "destination, use 'stash folder add'", name) os.Exit(1) } }
func processBackups(config *stash.Config) { for _, entry := range config.Entries { // log.Println("Processing Backup: ", entry.Name) if entry.LastBak.Add(entry.Frequency).Before(time.Now()) { doBackup(entry) config.TouchLastBak(entry.Name) config.ReloadConfig() } } }