Fix a few comment typos and improve consistency.

This commit is contained in:
Dave Collins 2013-01-13 00:17:58 -06:00
parent e892c84d38
commit 638b62b9f5
3 changed files with 12 additions and 12 deletions

View File

@ -23,9 +23,9 @@ printing facilities for Go data types are as follows:
* Pointers are dereferenced and followed * Pointers are dereferenced and followed
* Circular data structures are detected and handled properly * 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 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 a pointer receiver are optionally invoked when passing non-pointer
variables variables
@ -149,7 +149,7 @@ here.
Errors 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 detects them and handles them internally by printing the panic information
inline with the output. Since spew is intended to provide deep pretty printing inline with the output. Since spew is intended to provide deep pretty printing
capabilities on structures, it intentionally does not return any errors. capabilities on structures, it intentionally does not return any errors.

View File

@ -58,7 +58,7 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
// Keep list of all dereferenced pointers to show later. // Keep list of all dereferenced pointers to show later.
pointerChain := make([]uintptr, 0) 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 // pointers and unpacking interfaces down the chain while detecting circular
// references. // references.
nilFound := false nilFound := false
@ -147,7 +147,7 @@ func (d *dumpState) dump(v reflect.Value) {
} }
d.ignoreNextType = false 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 // is enabled
if !d.cs.DisableMethods { if !d.cs.DisableMethods {
if (kind != reflect.Invalid) && (kind != reflect.Interface) { 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. // Do nothing. We should never get here due to unpackValue calls.
case reflect.Ptr: 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. // been handled above.
case reflect.Map: case reflect.Map:
@ -316,16 +316,16 @@ package:
* Pointers are dereferenced and followed * Pointers are dereferenced and followed
* Circular data structures are detected and handled properly * 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 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 a pointer receiver are optionally invoked when passing non-pointer
variables variables
The configuration options are controlled by an exported package global, The configuration options are controlled by an exported package global,
spew.Config. See ConfigState for options documentation. 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{}) { func Dump(a ...interface{}) {
fdump(&Config, os.Stdout, a...) fdump(&Config, os.Stdout, a...)

View File

@ -259,16 +259,16 @@ package:
* Pointers are dereferenced and followed * Pointers are dereferenced and followed
* Circular data structures are detected and handled properly * 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 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 a pointer receiver are optionally invoked when passing non-pointer
variables variables
The configuration options are controlled by accessing the ConfigState associated The configuration options are controlled by accessing the ConfigState associated
with s via the Config method. See ConfigState for options documentation. 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{}) { func (s *SpewState) Dump(a ...interface{}) {
// The Config method creates the config state if needed, so call it instead // The Config method creates the config state if needed, so call it instead