Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/fmt/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@ occurred. If the panic is caused by a nil receiver to an Error,
String, or GoString method, however, the output is the undecorated
string, "<nil>".

Many packages whose APIs involve string formatting expose a trio of
functions similar to [Print], [Printf], and [Println].
For example, the [log.Print], [log.Printf] and [log.Println] functions
forward their arguments to the corresponding functions in this package.
To avoid confusion, other wrapper functions should follow the naming
and behavioral conventions established by this package.
In particular, a single function should not choose between literal
printing (like [Print]) and formatted printing (like [Printf])
based on the number of arguments; instead, provide separate functions.

# Scanning

An analogous set of functions scans formatted text to yield
Expand Down
Loading