Commit a4e950ec authored by Yazen2017's avatar Yazen2017 Committed by Robert Griesemer

doc: improve clarity of map index examples

The fourth example for map indexing states you have a map of type [K]V
and attempts to read in a variable of type T.  Further, the example
is meant to showcase the boolean return variable saying whether the
map contained a key, but overrides to type T.  This will not compile.

Changed last updated date to February 18

Fixes: #23895

Change-Id: I63c52adbcd989afd4855e329e6c727f4c01f7881
Reviewed-on: https://go-review.googlesource.com/94906Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
parent f356e83e
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of February 1, 2018",
"Subtitle": "Version of February 18, 2018",
"Path": "/ref/spec"
}-->
......@@ -3051,7 +3051,6 @@ used in an <a href="#Assignments">assignment</a> or initialization of the specia
v, ok = a[x]
v, ok := a[x]
var v, ok = a[x]
var v, ok T = a[x]
</pre>
<p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment