Update ConfigState documentation.
There is now support for concurrent configuration through the use of SpewState instances. Update the documenation to properly reflect this.
This commit is contained in:
parent
034a2a5a5e
commit
1dd6d991eb
|
@ -17,11 +17,10 @@
|
||||||
package spew
|
package spew
|
||||||
|
|
||||||
// ConfigState is used to describe configuration options used by spew to format
|
// ConfigState is used to describe configuration options used by spew to format
|
||||||
// and display values. There is currently only a single global instance, Config,
|
// and display values. There is a global instance, Config, that is used to
|
||||||
// that is used to control all Formatter and Dump functionality. This state
|
// control all top-level Formatter and Dump functionality. In addition, each
|
||||||
// is designed so that it would be fairly simple to add the ability to have
|
// SpewState instance provides access to a unique ConfigState which can be used
|
||||||
// unique config per Formatter or dumpState instance if there is demand for
|
// to control the configuration of that particular instance.
|
||||||
// such a feature.
|
|
||||||
type ConfigState struct {
|
type ConfigState struct {
|
||||||
// MaxDepth controls the maximum number of levels to descend into nested
|
// MaxDepth controls the maximum number of levels to descend into nested
|
||||||
// data structures. The default, 0, means there is no limit.
|
// data structures. The default, 0, means there is no limit.
|
||||||
|
@ -52,8 +51,8 @@ type ConfigState struct {
|
||||||
DisablePointerMethods bool
|
DisablePointerMethods bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config is the active configuration in use by spew. The configuration
|
// Config is the active configuration of the top-level functions.
|
||||||
// can be changed by modifying the contents of spew.Config.
|
// The configuration can be changed by modifying the contents of spew.Config.
|
||||||
var Config ConfigState = ConfigState{Indent: " "}
|
var Config ConfigState = ConfigState{Indent: " "}
|
||||||
|
|
||||||
var defaultConfig = ConfigState{Indent: " "}
|
var defaultConfig = ConfigState{Indent: " "}
|
||||||
|
|
Loading…
Reference in New Issue