From 9e07d8951e695a03a7852f20cfb51b2eefac0537 Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Mon, 8 May 2017 11:06:01 +0900 Subject: [PATCH] Fix not to declare Pagination every time --- cmd/mstdn/cmd_followers.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/mstdn/cmd_followers.go b/cmd/mstdn/cmd_followers.go index 1d34a12..9c99dbe 100644 --- a/cmd/mstdn/cmd_followers.go +++ b/cmd/mstdn/cmd_followers.go @@ -17,10 +17,9 @@ func cmdFollowers(c *cli.Context) error { if err != nil { return err } - var maxID int64 var followers []*mastodon.Account + var pg mastodon.Pagination for { - pg := mastodon.Pagination{MaxID: maxID} fs, err := client.GetAccountFollowers(context.Background(), account.ID, &pg) if err != nil { return err @@ -29,7 +28,7 @@ func cmdFollowers(c *cli.Context) error { if pg.MaxID == 0 { break } - maxID = pg.MaxID + pg.SinceID = 0 time.Sleep(10 * time.Second) } s := newScreen(config)