New directory structure

This commit is contained in:
2017-06-07 23:37:13 +02:00
parent c222a814e4
commit fdbfb22ef5
6 changed files with 32 additions and 15 deletions

View File

@ -0,0 +1,33 @@
package main
import (
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
func main() {
color.Yellow("Updating user references")
// Delete Nick:User records
arn.Truncate("NickToUser")
arn.Truncate("EmailToUser")
// Get a stream of all anime
allUsers, err := arn.AllUsers()
if err != nil {
panic(err)
}
// Iterate over the stream
count := 0
for user := range allUsers {
count++
println(count, user.Nick)
user.SetNick(user.Nick)
user.SetEmail(user.Email)
}
color.Green("Finished.")
}