]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: fix an error in documentation for fmt
authorBryan Heden <b.heden@gmail.com>
Thu, 14 Feb 2019 02:35:00 +0000 (02:35 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 23:04:04 +0000 (23:04 +0000)
Original Printf("%d", hi) obviously doesn't produce
%!d(string=hi) unless somewhere before this code
block you have hi := "hi" somewhere, also this change
maintains consistency with the rest of it

Change-Id: I40d8cca623176dcad66374ba74e3a1f8f975ac9e
GitHub-Last-Rev: 242e9ee6afba7ab22ed2967b0ba01ef18db01ca9
GitHub-Pull-Request: golang/go#30223
Reviewed-on: https://go-review.googlesource.com/c/162541
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/fmt/doc.go

index 2cb409b617099de1c2efb3d1765b72b9abce1128..a7115809d3dcf7d82c99ace45f55d4a950c7bb5a 100644 (file)
        description of the problem, as in these examples:
 
                Wrong type or unknown verb: %!verb(type=value)
-                       Printf("%d", hi):          %!d(string=hi)
+                       Printf("%d", "hi"):        %!d(string=hi)
                Too many arguments: %!(EXTRA type=value)
                        Printf("hi", "guys"):      hi%!(EXTRA string=guys)
                Too few arguments: %!verb(MISSING)