Removed old patches

This commit is contained in:
2017-11-01 20:11:05 +01:00
parent e70dc0daed
commit cf00461feb
28 changed files with 57 additions and 403 deletions

View File

@ -5,14 +5,13 @@ import (
)
func main() {
// Get a stream of all posts
allPosts, err := arn.StreamPosts()
arn.PanicOnError(err)
defer arn.Node.Close()
// Get a stream of all posts
threadToPosts := make(map[string][]string)
// Iterate over the stream
for post := range allPosts {
for post := range arn.StreamPosts() {
_, found := threadToPosts[post.ThreadID]
if !found {
@ -28,7 +27,6 @@ func main() {
arn.PanicOnError(err)
thread.Posts = posts
err = thread.Save()
arn.PanicOnError(err)
thread.Save()
}
}