Consistently defer messages for jobs

This commit is contained in:
2018-03-29 00:26:19 +02:00
parent dde6702e65
commit dee5bb1fe0
11 changed files with 25 additions and 16 deletions

View File

@ -13,6 +13,8 @@ var popularity = map[string]*arn.AnimePopularity{}
// made to it.
func main() {
color.Yellow("Updating anime ratings")
defer color.Green("Finished.")
defer arn.Node.Close()
allAnimeLists, err := arn.AllAnimeLists()
@ -93,8 +95,6 @@ func main() {
anime.Popularity = popularity[animeID]
anime.Save()
}
color.Green("Finished.")
}
func average(floatSlice []float64) float64 {