Refactor
This commit is contained in:
22
patches/add-draft-index/add-draft-index.go
Normal file
22
patches/add-draft-index/add-draft-index.go
Normal file
@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
func main() {
|
||||
color.Yellow("Addind draft indices")
|
||||
|
||||
// Iterate over the stream
|
||||
for user := range arn.MustStreamUsers() {
|
||||
fmt.Println(user.Nick)
|
||||
|
||||
draftIndex := arn.NewDraftIndex(user.ID)
|
||||
arn.PanicOnError(draftIndex.Save())
|
||||
}
|
||||
|
||||
color.Green("Finished.")
|
||||
}
|
Reference in New Issue
Block a user