1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:20:22 -07:00

spec: be clearer about which parameter section can be variadic

Fixes #13595.

Change-Id: I870ddc97ea25b7f6f7a1bb1a78e5e4874fba1ddc
Reviewed-on: https://go-review.googlesource.com/17871
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Robert Griesemer 2015-12-15 13:13:38 -08:00
parent 24a83d3545
commit 57c81ef257

View File

@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of November 30, 2015",
"Subtitle": "Version of December 15, 2015",
"Path": "/ref/spec"
}-->
@ -1114,7 +1114,7 @@ one unnamed result it may be written as an unparenthesized type.
</p>
<p>
The final parameter in a function signature may have
The final incoming parameter in a function signature may have
a type prefixed with <code>...</code>.
A function with such a parameter is called <i>variadic</i> and
may be invoked with zero or more arguments for that parameter.
@ -2090,7 +2090,7 @@ Receiver = Parameters .
<p>
The receiver is specified via an extra parameter section preceding the method
name. That parameter section must declare a single parameter, the receiver.
name. That parameter section must declare a single non-variadic parameter, the receiver.
Its type must be of the form <code>T</code> or <code>*T</code> (possibly using
parentheses) where <code>T</code> is a type name. The type denoted by <code>T</code> is called
the receiver <i>base type</i>; it must not be a pointer or interface type and