Browse files

fmt: document verbs %b %d %o %x %X for printing pointers

This has been supported since Go 1 and there's even a test for it.
The documentation was missing.

Fixes #21409.

Change-Id: I5813488f6a98c1b4506c239e968d43344b91be12
Reviewed-by: Ian Lance Taylor <>
  • Loading branch information...
robpike committed Aug 28, 2017
1 parent 2abef59 commit a4140b745ce22c56821750001f30fca4020b4650
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/fmt/doc.go
@@ -47,6 +47,8 @@
%X base 16, upper-case, two characters per byte
%p base 16 notation, with leading 0x
The %b, %d, %o, %x and %X verbs also work with pointers,
formatting the value exactly as if it were an integer.
The default format for %v is:
bool: %t

0 comments on commit a4140b7

Please sign in to comment.