Skip to content

Commit e0ee5d6

Browse files
authored
Merge pull request #49 from golang/master
[pull] master from golang:master
2 parents 82d8148 + e428359 commit e0ee5d6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/fmt/doc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ occurred. If the panic is caused by a nil receiver to an Error,
299299
String, or GoString method, however, the output is the undecorated
300300
string, "<nil>".
301301
302+
Many packages whose APIs involve string formatting expose a trio of
303+
functions similar to [Print], [Printf], and [Println].
304+
For example, the [log.Print], [log.Printf] and [log.Println] functions
305+
forward their arguments to the corresponding functions in this package.
306+
To avoid confusion, other wrapper functions should follow the naming
307+
and behavioral conventions established by this package.
308+
In particular, a single function should not choose between literal
309+
printing (like [Print]) and formatted printing (like [Printf])
310+
based on the number of arguments; instead, provide separate functions.
311+
302312
# Scanning
303313
304314
An analogous set of functions scans formatted text to yield

0 commit comments

Comments
 (0)