File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,6 +299,16 @@ occurred. If the panic is caused by a nil receiver to an Error,
299299String, or GoString method, however, the output is the undecorated
300300string, "<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
304314An analogous set of functions scans formatted text to yield
You can’t perform that action at this time.
0 commit comments