Hello,
We had the bug below in production:
https://go.dev/play/p/-jewy7e7UcZ
Look at the `opt` variable inside `listGithubPullReviews`, it's set multiple times (inside the loop) but never used... it was supposed to be passed as the last argument of `ListReviews()`.
Why Go compiler is not giving an error for this case? AFAICS all of those `opt.Page = resp.NextPage` inside the loop cannot make any side effects, then it looks safe to assume the variable is only set and never used?
But if you change from a struct to a plain int, then the compiler gives: `./prog.go:6:2: a declared and not used`
Luckily, we were using a `ctx` with timeout otherwise it would be an infinite loop. The thing was tested but only for cases where all results came in a single page, then the loop aborted in the first iteration. I think this could be detected by the compiler, no?