diff --git a/spew/doc.go b/spew/doc.go index 94db62d..3465b22 100644 --- a/spew/doc.go +++ b/spew/doc.go @@ -23,9 +23,9 @@ printing facilities for Go data types are as follows: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly - * Custom error/Stringer interfaces are optionally invoked, including + * Custom Stringer/error interfaces are optionally invoked, including on unexported types - * Custom types which only implement the error/Stringer interfaces via + * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables @@ -149,7 +149,7 @@ here. Errors -Since it is possible for custom error/Stringer interfaces to panic, spew +Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information inline with the output. Since spew is intended to provide deep pretty printing capabilities on structures, it intentionally does not return any errors. diff --git a/spew/dump.go b/spew/dump.go index 4697263..0416ee0 100644 --- a/spew/dump.go +++ b/spew/dump.go @@ -58,7 +58,7 @@ func (d *dumpState) dumpPtr(v reflect.Value) { // Keep list of all dereferenced pointers to show later. pointerChain := make([]uintptr, 0) - // Figure out how many levels of indirection there are by derferencing + // Figure out how many levels of indirection there are by dereferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false @@ -147,7 +147,7 @@ func (d *dumpState) dump(v reflect.Value) { } d.ignoreNextType = false - // Call error/Stringer interfaces if they exist and the handle methods flag + // Call Stringer/error interfaces if they exist and the handle methods flag // is enabled if !d.cs.DisableMethods { if (kind != reflect.Invalid) && (kind != reflect.Interface) { @@ -210,7 +210,7 @@ func (d *dumpState) dump(v reflect.Value) { // Do nothing. We should never get here due to unpackValue calls. case reflect.Ptr: - // Do nothing. We should never get here since pointer have already + // Do nothing. We should never get here since pointers have already // been handled above. case reflect.Map: @@ -316,16 +316,16 @@ package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly - * Custom error/Stringer interfaces are optionally invoked, including + * Custom Stringer/error interfaces are optionally invoked, including on unexported types - * Custom types which only implement the error/Stringer interfaces via + * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. -See Fdump if you would prefer dump to an arbitrary io.Writer. +See Fdump if you would prefer dumping to an arbitrary io.Writer. */ func Dump(a ...interface{}) { fdump(&Config, os.Stdout, a...) diff --git a/spew/spew.go b/spew/spew.go index 46fd904..d106f95 100644 --- a/spew/spew.go +++ b/spew/spew.go @@ -259,16 +259,16 @@ package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly - * Custom error/Stringer interfaces are optionally invoked, including + * Custom Stringer/error interfaces are optionally invoked, including on unexported types - * Custom types which only implement the error/Stringer interfaces via + * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables The configuration options are controlled by accessing the ConfigState associated with s via the Config method. See ConfigState for options documentation. -See Fdump if you would prefer dump to an arbitrary io.Writer. +See Fdump if you would prefer dumping to an arbitrary io.Writer. */ func (s *SpewState) Dump(a ...interface{}) { // The Config method creates the config state if needed, so call it instead