]> Cypherpunks repositories - gostls13.git/commit
math/big: add %#b and %O integer formats
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 05:55:38 +0000 (00:55 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 26 Feb 2019 19:39:19 +0000 (19:39 +0000)
commitd6311ff1e43dd1e7c9cb9edccd10a04b63a7c41f
treefff0d7791115991eba2ac4da9b98dd58d3a30733
parent675503c507194a48c01a39a0f25a6d0c9d772477
math/big: add %#b and %O integer formats

Matching fmt, %#b now prints an 0b prefix,
and %O prints octal with an 0o prefix.

See golang.org/design/19308-number-literals for background.

For #19308.
For #12711.

Change-Id: I139c5a9a1dfae15415621601edfa13c6a5f19cfc
Reviewed-on: https://go-review.googlesource.com/c/160250
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/math/big/intconv.go
src/math/big/intconv_test.go