diff --git a/api/user.go b/api/user.go index 0107f10..25dca50 100644 --- a/api/user.go +++ b/api/user.go @@ -134,21 +134,13 @@ func (client *Client) FetchUserComments(username string) ([]Comment, error) { data := gjson.Parse(string(body)) - wg := sync.WaitGroup{} comments := make([]Comment, 0) data.Get("data").ForEach( func(key, value gjson.Result) bool { - wg.Add(1) - - go func() { - defer wg.Done() - comments = append(comments, parseComment(value)) - }() - + comments = append(comments, parseComment(value)) return true }, ) - wg.Wait() client.Cache.Set(username+"-usercomments", comments, cache.DefaultExpiration) return comments, nil