]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: split package documentation into more sections
authorBranden J Brown <zephyrtronium@gmail.com>
Wed, 2 Jun 2021 18:55:34 +0000 (14:55 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 7 Jun 2021 15:17:48 +0000 (15:17 +0000)
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>

src/fmt/doc.go

index d05ee519c3db471c384bae5bfe05de56914b0dcc..c584cc9465e57364b27143529040d6f4dcce9434 100644 (file)
        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.
                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