commit | 4d627d92a472f0b737ceaa7d920dbafb7c317864 | [log] [tgz] |
---|---|---|
author | Francesc Campoy <campoy@golang.org> | Mon Jul 27 15:26:29 2015 -0700 |
committer | Francesc Campoy Flores <campoy@golang.org> | Tue Jul 28 00:21:29 2015 +0000 |
tree | 4b49fdd9b4bf2ea7b569f601b6cbaa06e900c600 | |
parent | 143a8efbd4a2c0ce49420e8cad53a93dfe7a9331 [diff] |
tour: add note regarding := with map two value assignment Change-Id: I5c6b820e7dc0afa2d007f93c72fdb603c1d65d65 Reviewed-on: https://go-review.googlesource.com/12714 Reviewed-by: Rob Pike <r@golang.org>
diff --git a/content/moretypes.article b/content/moretypes.article index ff5c3ac..9b1005d 100644 --- a/content/moretypes.article +++ b/content/moretypes.article
@@ -218,6 +218,10 @@ Similarly, when reading from a map if the key is not present the result is the zero value for the map's element type. +_Note_: if `elem` or `ok` have not yet been declared you could use a short declaration form: + + elem, ok := m[key] + .play moretypes/mutating-maps.go * Exercise: Maps