aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json
diff options
context:
space:
mode:
authorHarald Albrecht <harald.albrecht@gmx.net>2024-12-26 21:27:33 +0100
committerGopher Robot <gobot@golang.org>2024-12-27 05:44:33 -0800
commitd7c3e93c16eeb328e9d943aa4fbd5ec8c793ec1b (patch)
treee5fe2fe912862da56d94886b94645ef4d4d45d61 /src/encoding/json
parentcce75da30b6a1a58f7265401279cab707d403dcf (diff)
downloadgo-d7c3e93c16eeb328e9d943aa4fbd5ec8c793ec1b.tar.xz
iter: improve documentation with iterator example
In introducing iterators, package iter gives an example of how to use an iterator in a range-over-func loop, but currently does not give an example of what an iterator implementation might look like. This change adds the example of map.Keys() before the usage example. Additionally, it references to the Go blog for further examples, as well as the language spec about for-range loops. Fixes #70986 Change-Id: I7108d341d314d7de146b4c221700736c943a9f5d Reviewed-on: https://go-review.googlesource.com/c/go/+/638895 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions