Skip to content

Commit

Permalink
go: fix ignored page token bug in iterator (googleapis#2716)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz authored and busunkim96 committed Nov 7, 2019
1 parent 35b2686 commit 5addb73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/resources/com/google/api/codegen/go/main.snip
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.PageSize)
it.pageInfo.Token = req.PageToken
return it
}
@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ func (c *LibClient) ListShelves(ctx context.Context, req *librarypb.ListShelvesR
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.PageSize)
it.pageInfo.Token = req.PageToken
return it
}

Expand Down Expand Up @@ -577,6 +578,7 @@ func (c *LibClient) ListBooks(ctx context.Context, req *librarypb.ListBooksReque
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.PageSize)
it.pageInfo.Token = req.PageToken
return it
}

Expand Down Expand Up @@ -661,6 +663,7 @@ func (c *LibClient) ListStrings(ctx context.Context, req *librarypb.ListStringsR
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.PageSize)
it.pageInfo.Token = req.PageToken
return it
}

Expand Down Expand Up @@ -841,6 +844,7 @@ func (c *LibClient) FindRelatedBooks(ctx context.Context, req *librarypb.FindRel
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.PageSize)
it.pageInfo.Token = req.PageToken
return it
}

Expand Down

0 comments on commit 5addb73

Please sign in to comment.