Fix not to declare Pagination every time
parent
f283f05671
commit
9e07d8951e
|
@ -17,10 +17,9 @@ func cmdFollowers(c *cli.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var maxID int64
|
|
||||||
var followers []*mastodon.Account
|
var followers []*mastodon.Account
|
||||||
|
var pg mastodon.Pagination
|
||||||
for {
|
for {
|
||||||
pg := mastodon.Pagination{MaxID: maxID}
|
|
||||||
fs, err := client.GetAccountFollowers(context.Background(), account.ID, &pg)
|
fs, err := client.GetAccountFollowers(context.Background(), account.ID, &pg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -29,7 +28,7 @@ func cmdFollowers(c *cli.Context) error {
|
||||||
if pg.MaxID == 0 {
|
if pg.MaxID == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
maxID = pg.MaxID
|
pg.SinceID = 0
|
||||||
time.Sleep(10 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
}
|
}
|
||||||
s := newScreen(config)
|
s := newScreen(config)
|
||||||
|
|
Loading…
Reference in New Issue