From: Rob Pike Date: Tue, 26 Mar 2013 18:05:06 +0000 (-0700) Subject: builtin: add linkable-to declarations for iota and nil X-Git-Tag: go1.1rc2~325 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=02b755081764bd1cc36e5e7af2d485f5bc9cabe3;p=gostls13.git builtin: add linkable-to declarations for iota and nil Aids godoc. R=golang-dev, gri, bradfitz CC=golang-dev https://golang.org/cl/7992044 --- diff --git a/src/pkg/builtin/builtin.go b/src/pkg/builtin/builtin.go index 7b5e9ab1d6..d3c1a5c55a 100644 --- a/src/pkg/builtin/builtin.go +++ b/src/pkg/builtin/builtin.go @@ -85,6 +85,15 @@ type byte byte // used, by convention, to distinguish character values from integer values. type rune rune +// iota is a predeclared identifier representing the untyped integer ordinal +// number of the current const specification in a (usually parenthesized) +// const declaration. It is zero-indexed. +const iota = 0 // Untyped int. + +// nil is a predeclared identifier representing the zero value for a +// pointer, channel, func, interface, map, or slice type. +var nil Type // Type must be a pointer, channel, func, interface, map, or slice type + // Type is here for the purposes of documentation only. It is a stand-in // for any Go type, but represents the same type for any given function // invocation.