diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-03-04 21:27:36 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-04 21:27:36 +0100 |
commit | 04b08da9af0c450d645ab7389d1467308cfc2db8 (patch) | |
tree | db247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/pkg/builtin | |
parent | 917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff) | |
download | golang-upstream/1.1_hg20130304.tar.gz |
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/pkg/builtin')
-rw-r--r-- | src/pkg/builtin/builtin.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pkg/builtin/builtin.go b/src/pkg/builtin/builtin.go index e81616ca4..7b5e9ab1d 100644 --- a/src/pkg/builtin/builtin.go +++ b/src/pkg/builtin/builtin.go @@ -81,9 +81,8 @@ type uintptr uintptr // integer values. type byte byte -// rune is an alias for int and is equivalent to int in all ways. It is +// rune is an alias for int32 and is equivalent to int32 in all ways. It is // used, by convention, to distinguish character values from integer values. -// In a future version of Go, it will change to an alias of int32. type rune rune // Type is here for the purposes of documentation only. It is a stand-in @@ -115,6 +114,8 @@ type ComplexType complex64 // result of append, often in the variable holding the slice itself: // slice = append(slice, elem1, elem2) // slice = append(slice, anotherSlice...) +// As a special case, it is legal to append a string to a byte slice, like this: +// slice = append([]byte("hello "), "world"...) func append(slice []Type, elems ...Type) []Type // The copy built-in function copies elements from a source slice into a @@ -125,8 +126,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: |