Grokking Advanced Go
0% completed
Capstone: Generic Repository and Pagination
The program below reads a list of order IDs in pages of two, using the count of IDs already read to find the next page. Between the two reads, another client cancels order 1001. Read the output and look for order 1003.
Output:
page 1: [1001 1002] page 2: [1004 1005]
Order 1003 appears on neither page. Deleting one order moved every later order one position toward the start, so position 2 no longer holds what it held a moment earlier. This reading method (offset pagination) gives no error, and the client has no way to learn that it missed an order.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%