diff options
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: |