summaryrefslogtreecommitdiff
path: root/spew
diff options
context:
space:
mode:
authorDave Collins <[email protected]>2013-11-14 21:19:56 -0600
committerDave Collins <[email protected]>2013-11-14 21:19:56 -0600
commitf0ba95e184f4063f60a2338ad95a7ee1fc554e62 (patch)
treed4105e0d57afa90a74bd29d1c68ea3779cab6c2c /spew
parentf13f098c7a759ac1c79318d6aee18426939db828 (diff)
Fix a few style issues pointed out by golint.
Diffstat (limited to 'spew')
-rw-r--r--spew/config.go2
-rw-r--r--spew/dump.go6
-rw-r--r--spew/spew.go2
3 files changed, 4 insertions, 6 deletions
diff --git a/spew/config.go b/spew/config.go
index d766dfb..ff6b4b6 100644
--- a/spew/config.go
+++ b/spew/config.go
@@ -84,7 +84,7 @@ type ConfigState struct {
// Config is the active configuration of the top-level functions.
// The configuration can be changed by modifying the contents of spew.Config.
-var Config ConfigState = ConfigState{Indent: " "}
+var Config = ConfigState{Indent: " "}
// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
diff --git a/spew/dump.go b/spew/dump.go
index 771b473..b5dcfb2 100644
--- a/spew/dump.go
+++ b/spew/dump.go
@@ -272,9 +272,9 @@ func (s *valuesSorter) Less(i, j int) bool {
return s.values[i].String() < s.values[j].String()
}
-// Generic sort function for native types: int, uint, bool, string and uintptr.
-// Other inputs are sort according to their Value.String() value to ensure
-// display stability.
+// SortValues is a generic sort function for native types: int, uint, bool,
+// string and uintptr. Other inputs are sorted according to their
+// Value.String() value to ensure display stability.
func SortValues(values []reflect.Value) {
if len(values) == 0 {
return
diff --git a/spew/spew.go b/spew/spew.go
index 643f382..d8233f5 100644
--- a/spew/spew.go
+++ b/spew/spew.go
@@ -104,8 +104,6 @@ func Println(a ...interface{}) (n int, err error) {
return fmt.Println(convertArgs(a)...)
}
-// Sprintf formats according to a format specifier and returns the resulting string.
-//
// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
// passed with a default Formatter interface returned by NewFormatter. It
// returns the resulting string. See NewFormatter for formatting details.