Azure-Samples / Azure-Samples/storage-blobs-go-quickstart

Sample does not highlight the need for application - level pagination handling

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
31
Forks
28
PR merge metrics
No merged PRs in 30d

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

This being a first touchpoint for many consumers of Azure, I wanted to highlight a naiive assumption I made consuming this API that would have led to data loss in prod.
There is no indication in this getting started that the application is expected to handle HTTP pagination by observing response codes and setting up subsequent read ops. This breaks from Go idioms readers- one reader per blob is a reasonable assumption.
I would suggest calling out the inspection of these HTTP variables in the example - or even mentioning the need in comments- as a warning to API consumers as to the limitations of what the library covers for the application programmer.

I got bit by this. That's on me. I hope we can save someone else from the same issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.