This commit is contained in:
Tolstov Georgij 2019-07-17 12:46:31 +00:00 committed by GitHub
commit 311e57e557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import (
"bytes"
"fmt"
"io"
"os"
)
// ConfigState houses the configuration options used by spew to format and
@ -271,7 +270,9 @@ See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
get the formatted result as a string.
*/
func (c *ConfigState) Dump(a ...interface{}) {
fdump(c, os.Stdout, a...)
var buf bytes.Buffer
fdump(c, &buf, a...)
fmt.Print(buf.String())
}
// Sdump returns a string with the passed arguments formatted exactly the same

View File

@ -21,7 +21,6 @@ import (
"encoding/hex"
"fmt"
"io"
"os"
"reflect"
"regexp"
"strconv"
@ -505,5 +504,7 @@ See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
get the formatted result as a string.
*/
func Dump(a ...interface{}) {
fdump(&Config, os.Stdout, a...)
var buf bytes.Buffer
fdump(&Config, &buf, a...)
fmt.Print(buf.String())
}