Skip to content

Commit

Permalink
convert writer to buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanl committed Mar 22, 2015
1 parent 4890776 commit adb5e97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package godo
import (
"bytes"
"fmt"
"io"
"reflect"
)

Expand All @@ -18,7 +17,7 @@ func Stringify(message interface{}) string {
}

// stringifyValue was graciously cargoculted from the goprotubuf library
func stringifyValue(w io.Writer, val reflect.Value) {
func stringifyValue(w *bytes.Buffer, val reflect.Value) {
if val.Kind() == reflect.Ptr && val.IsNil() {
_, _ = w.Write([]byte("<nil>"))
return
Expand Down

0 comments on commit adb5e97

Please sign in to comment.