From: Rob Pike Date: Mon, 21 Jul 2008 23:18:04 +0000 (-0700) Subject: map delete X-Git-Tag: weekly.2009-11-06~3449 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=777ee7163bba96f2c9b3dfe135d8ad4ab837c062;p=gostls13.git map delete SVN=128258 --- diff --git a/doc/go_lang.txt b/doc/go_lang.txt index d73c67aaf0..1770db54e2 100644 --- a/doc/go_lang.txt +++ b/doc/go_lang.txt @@ -1609,6 +1609,12 @@ the value is assigned and the second, boolean variable is set to true. Otherwise the variable is unchanged, and the boolean value is set to false. value, present = map_var[key] + +To delete a value from a map, use a tuple assignment with the map on the left +and a false boolean expression as the second expression on the right, such +as: + + map_var[key] = value, false In assignments, the type of the expression must match the type of the left-hand side.