summaryrefslogtreecommitdiff
path: root/spew/common.go
diff options
context:
space:
mode:
authorDave Collins <[email protected]>2013-03-08 19:54:27 -0600
committerDave Collins <[email protected]>2013-03-08 19:55:04 -0600
commit471552e81e198e81193f3b19abb61f901a27710a (patch)
tree380c1eacc578a9e6083e4c75c26b78f683e64efe /spew/common.go
parentf92eb047c3b8c66afd229a106e185f8481ee1b42 (diff)
Modify printInt and printUint to accept base.
This paves the way to improve how byte arrays are output as well as increases the flexibily of the functions.
Diffstat (limited to 'spew/common.go')
-rw-r--r--spew/common.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/spew/common.go b/spew/common.go
index 7bea858..e452260 100644
--- a/spew/common.go
+++ b/spew/common.go
@@ -186,13 +186,13 @@ func printBool(w io.Writer, val bool) {
}
// printInt outputs a signed integer value to Writer w.
-func printInt(w io.Writer, val int64) {
- w.Write([]byte(strconv.FormatInt(val, 10)))
+func printInt(w io.Writer, val int64, base int) {
+ w.Write([]byte(strconv.FormatInt(val, base)))
}
// printUint outputs an unsigned integer value to Writer w.
-func printUint(w io.Writer, val uint64) {
- w.Write([]byte(strconv.FormatUint(val, 10)))
+func printUint(w io.Writer, val uint64, base int) {
+ w.Write([]byte(strconv.FormatUint(val, base)))
}
// printFloat outputs a floating point value using the specified precision,