diff --git a/drivel.go b/drivel.go index 8ece7a3..7a8ba45 100644 --- a/drivel.go +++ b/drivel.go @@ -419,9 +419,8 @@ func like(args []string) error { return nil } -func _following() (following hashset) { +func _following() (following []string) { log := func(err error) { optLogFatal("following", err) } - following = makeHashset() defer func() { if r := recover(); r != nil { fmt.Fprintln(os.Stderr, r) @@ -435,7 +434,7 @@ func _following() (following hashset) { err = json.Unmarshal(body, &response) log(err) for _, user := range response.Users { - following.add(user.Screen_name) + following = append(following, user.Screen_name) } cursor = response.Next_cursor } @@ -444,8 +443,8 @@ func _following() (following hashset) { func following(args []string) error { checkUsage(args, 0, 0, "following") - set := _following() - for user, _ := range set { + users := _following() + for _, user := range users { fmt.Println(user) } return nil