func zipArchives(cfg *conf.Config, dirStr string) error { //subtract a month so we don't zip the month represented by current date - ZipAgeDays maxTime := cfg.ZipTime().AddDate(0, -1, 0) count, err := cfg.EachMonth(dirStr, maxTime, zipArchive) if err == nil { fmt.Printf("Zipped %d folder(s)\n", count) } return err }