From: Jingcheng Zhang Date: Fri, 14 Dec 2012 17:13:42 +0000 (-0800) Subject: builtin: correct comment on builtin function delete(). X-Git-Tag: go1.1rc2~1624 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0b50a5dad78193fecae52f18a01df928c229eb32;p=gostls13.git builtin: correct comment on builtin function delete(). Delete on a nil map is now a no-op. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6938054 --- diff --git a/src/pkg/builtin/builtin.go b/src/pkg/builtin/builtin.go index a30943b894..91d263a623 100644 --- a/src/pkg/builtin/builtin.go +++ b/src/pkg/builtin/builtin.go @@ -124,8 +124,8 @@ func append(slice []Type, elems ...Type) []Type func copy(dst, src []Type) int // The delete built-in function deletes the element with the specified key -// (m[key]) from the map. If there is no such element, delete is a no-op. -// If m is nil, delete panics. +// (m[key]) from the map. If m is nil or there is no such element, delete +// is a no-op. func delete(m map[Type]Type1, key Type) // The len built-in function returns the length of v, according to its type: