Update README and doc.go with new SortKeys option.
This commit is contained in:
parent
92b7ef315a
commit
550ce83cb9
|
@ -119,6 +119,14 @@ options. See the ConfigState documentation for more details.
|
|||
* ContinueOnMethod
|
||||
Enables recursion into types after invoking error and Stringer interface
|
||||
methods. Recursion after method invocation is disabled by default.
|
||||
|
||||
* SortKeys
|
||||
Specifies map keys should be sorted before being printed. Use
|
||||
this to have a more deterministic, diffable output. Note that
|
||||
only native types (bool, int, uint, floats, uintptr and string)
|
||||
are supported with other types sorted according to the
|
||||
reflect.Value.String() output which guarantees display stability.
|
||||
Natural map order is used by default.
|
||||
```
|
||||
|
||||
## License
|
||||
|
|
|
@ -75,9 +75,9 @@ type ConfigState struct {
|
|||
ContinueOnMethod bool
|
||||
|
||||
// SortKeys specifies map keys should be sorted before being printed. Use
|
||||
// this to have a more deterministic, diffable output. Note that only
|
||||
// native types (bool, int, uint, floats, uintptr and string) are supported,
|
||||
// other types will be sort according to the reflect.Value.String() output
|
||||
// this to have a more deterministic, diffable output. Note that only
|
||||
// native types (bool, int, uint, floats, uintptr and string) are supported
|
||||
// with other types sorted according to the reflect.Value.String() output
|
||||
// which guarantees display stability.
|
||||
SortKeys bool
|
||||
}
|
||||
|
|
|
@ -95,6 +95,14 @@ The following configuration options are available:
|
|||
Enables recursion into types after invoking error and Stringer interface
|
||||
methods. Recursion after method invocation is disabled by default.
|
||||
|
||||
* SortKeys
|
||||
Specifies map keys should be sorted before being printed. Use
|
||||
this to have a more deterministic, diffable output. Note that
|
||||
only native types (bool, int, uint, floats, uintptr and string)
|
||||
are supported with other types sorted according to the
|
||||
reflect.Value.String() output which guarantees display stability.
|
||||
Natural map order is used by default.
|
||||
|
||||
Dump Usage
|
||||
|
||||
Simply call spew.Dump with a list of variables you want to dump:
|
||||
|
|
Loading…
Reference in New Issue