spec: clarify admissible argument types for print, println

Fixes #19885.

Change-Id: I55420aace1b0f714df2d6460d2d1595f6863dd06
Reviewed-on: https://go-review.googlesource.com/42023
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Robert Griesemer 2017-04-27 17:54:49 -07:00
parent 86cfe93515
commit 50f67add81

View file

@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of April 17, 2017",
"Subtitle": "Version of April 28, 2017",
"Path": "/ref/spec"
}-->
@ -5965,6 +5965,11 @@ print prints all arguments; formatting of arguments is implementation-speci
println like print but prints spaces between arguments and a newline at the end
</pre>
<p>
Implementation restriction: <code>print</code> and <code>println</code> need not
accept arbitrary argument types, but printing of boolean, numeric, and string
<a href="#Types">types</a> must be supported.
</p>
<h2 id="Packages">Packages</h2>