Explorar o código

Fix a few comment typos and improve consistency.

Dave Collins %!s(int64=13) %!d(string=hai) anos
pai
achega
638b62b9f5
Modificáronse 3 ficheiros con 12 adicións e 12 borrados
  1. 3 3
      spew/doc.go
  2. 6 6
      spew/dump.go
  3. 3 3
      spew/spew.go

+ 3 - 3
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.

+ 6 - 6
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...)

+ 3 - 3
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