diff options
| author | Dave Collins <[email protected]> | 2013-03-03 12:23:56 -0600 |
|---|---|---|
| committer | Dave Collins <[email protected]> | 2013-03-03 12:59:13 -0600 |
| commit | 9dfc23886547f6515837b0d94c156252fcca83fc (patch) | |
| tree | 926db96f954fb343a9a793dd0acaaa406ab9d38a /spew/common.go | |
| parent | 6d6046a9de11932943e5ef05d72c0ee2f02f1797 (diff) | |
Cleanup documentation on new ContinueOnMethod code.
This commit expands on TShadwell's work attached to issue #8. It
rounds out the documentation for the new option.
Diffstat (limited to 'spew/common.go')
| -rw-r--r-- | spew/common.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spew/common.go b/spew/common.go index 11ec612..7bea858 100644 --- a/spew/common.go +++ b/spew/common.go @@ -151,10 +151,10 @@ func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) case error: defer catchPanic(w, v) if cs.ContinueOnMethod { - w.Write(append(openParenBytes, []byte(iface.Error())...)) + w.Write(openParenBytes) + w.Write([]byte(iface.Error())) w.Write(closeParenBytes) w.Write(spaceBytes) - return false } @@ -164,10 +164,10 @@ func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) case fmt.Stringer: defer catchPanic(w, v) if cs.ContinueOnMethod { - w.Write(append(openParenBytes, []byte(iface.String())...)) + w.Write(openParenBytes) + w.Write([]byte(iface.String())) w.Write(closeParenBytes) w.Write(spaceBytes) - return false } w.Write([]byte(iface.String())) |
