Update docs

This commit is contained in:
James Craig Burley 2020-01-14 15:59:13 -05:00
parent 9422b0e545
commit 8a5623ace0
2 changed files with 26 additions and 2 deletions

View File

@ -185,6 +185,30 @@ options. See the ConfigState documentation for more details.
spewed to strings and sorted by those strings. This is only considered spewed to strings and sorted by those strings. This is only considered
if SortKeys is true. if SortKeys is true.
* NoDuplicates
NoDuplicates specifies that any given pointer should have
its dereference dumped only once. This is similar to
circularity detection, but applies to all pointers across a
given dump action (or SpewState). This can consume much memory.
* UseOrdinals
UseOrdinals specifies that pointer values are to be
replaced with monotonically increasing integers. It has no
effect if DisablePointerAddresses is true; else, it
provides some degree of stability across runs versus
printing out raw pointers. This can consume much memory.
* PreserveSpewState
Preserve state of a spew (dump, format) operation for use
by the next such operation (including across multiple
arguments to a single API call as well as across API
calls). Currently useful only when NoDuplicates is true.
* SpewState
The state of the last spew (dump, format) operation, if
PreserveSpewState was true when that operation was started.
Can be copied to a different ConfigState object.
``` ```
## Unsafe Package Dependency ## Unsafe Package Dependency

View File

@ -102,7 +102,7 @@ type ConfigState struct {
// NoDuplicates specifies that any given pointer should have // NoDuplicates specifies that any given pointer should have
// its dereference dumped only once. This is similar to // its dereference dumped only once. This is similar to
// circularity detection, but applies to all pointers across a // circularity detection, but applies to all pointers across a
// given dump action. This can consume much memory. // given dump action (or SpewState). This can consume much memory.
NoDuplicates bool NoDuplicates bool
// UseOrdinals specifies that pointer values are to be // UseOrdinals specifies that pointer values are to be
@ -119,7 +119,7 @@ type ConfigState struct {
PreserveSpewState bool PreserveSpewState bool
// The state of the last spew (dump, format) operation, if // The state of the last spew (dump, format) operation, if
// PreserveSpewState was when that operation was started. // PreserveSpewState was true when that operation was started.
// Can be copied to a different ConfigState object. // Can be copied to a different ConfigState object.
SpewState SpewState SpewState SpewState
} }