diff options
Diffstat (limited to 'spew/doc.go')
| -rw-r--r-- | spew/doc.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/spew/doc.go b/spew/doc.go index 61c0091..94db62d 100644 --- a/spew/doc.go +++ b/spew/doc.go @@ -58,20 +58,29 @@ printing style, use the convenience wrappers Printf, Fprintf, etc with either Configuration Options +Configuration of spew is handled by fields in the ConfigState type. For +convenience, all of the top-level functions use a global state available +via the spew.Config global. + +It is also possible to create a SpewState instance which provides a unique +ConfigState accessible via the Config method. The methods of SpewState are +equivalent to the top-level functions. This allows concurrent configuration +options. See the SpewState documentation for more details. + The following configuration options are available: - spew.Config.MaxDepth + * MaxDepth Maximum number of levels to descend into nested data structures. There is no limit by default. - spew.Config.Indent + * Indent String to use for each indentation level for Dump functions. It is a single space by default. A popular alternative is "\t". - spew.Config.DisableMethods + * DisableMethods Disables invocation of error and Stringer interface methods. Method invocation is enabled by default. - spew.Config.DisablePointerMethods + * DisablePointerMethods Disables invocation of error and Stringer interface methods on types which only accept pointer receivers from non-pointer variables. Pointer method invocation is enabled by default. |
