diff options
author | Branden J Brown <zephyrtronium@gmail.com> | 2021-06-02 14:55:34 -0400 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@golang.org> | 2021-06-07 15:17:48 +0000 |
commit | 7406180012d828f536112c9bffb7d3edd9ea5c7e (patch) | |
tree | ad255fe4a2bdf81eec8623987122b41289e7c5db /src/fmt | |
parent | e3176bbc3ec7ab3889f02432f6fd088c90fc12dd (diff) | |
download | go-7406180012d828f536112c9bffb7d3edd9ea5c7e.tar.gz go-7406180012d828f536112c9bffb7d3edd9ea5c7e.zip |
fmt: split package documentation into more sections
The package-level documentation on fmt previously had only two formal
sections, for printing and scanning. Because of this, the section on
printing was very long, including some pseudo-sections describing
particular features. This feature makes those pseudo-sections into
proper sections, both to improve readability and so that those sections
have hyperlinks on documentation sites.
Fixes #46522
Change-Id: I38b7bc3447610faca446051da235edcbbd063f61
Reviewed-on: https://go-review.googlesource.com/c/go/+/324349
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/fmt')
-rw-r--r-- | src/fmt/doc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmt/doc.go b/src/fmt/doc.go index d05ee519c3..c584cc9465 100644 --- a/src/fmt/doc.go +++ b/src/fmt/doc.go @@ -189,7 +189,7 @@ When printing a struct, fmt cannot and therefore does not invoke formatting methods such as Error or String on unexported fields. - Explicit argument indexes: + Explicit argument indexes In Printf, Sprintf, and Fprintf, the default behavior is for each formatting verb to format successive arguments passed in the call. @@ -211,7 +211,7 @@ fmt.Sprintf("%d %d %#[1]x %#x", 16, 17) will yield "16 17 0x10 0x11". - Format errors: + Format errors If an invalid argument is given for a verb, such as providing a string to %d, the generated string will contain a |