diff options
| author | Dave Collins <[email protected]> | 2013-01-10 20:56:26 -0600 |
|---|---|---|
| committer | Dave Collins <[email protected]> | 2013-01-10 20:56:26 -0600 |
| commit | f9d76718448815686718a5a8fae1c91fbf8f9a3c (patch) | |
| tree | abf6a392032985cb02649fc30955579d49ea2618 | |
| parent | 184d118062e467401f87c22ea4034135cf508529 (diff) | |
Update README.md
| -rw-r--r-- | README.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -7,6 +7,11 @@ output is likely to change, however it is already quite capable. It is licensed under the liberal ISC license, so it may be used in open source or commercial projects. +If you're interested in reading about how this package came to life and some +of the challenges involved in provide a deep pretty printer, there is a blog +post about it +[here](https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/). + ## Documentation Full `go doc` style documentation for the project can be viewed online without @@ -68,6 +73,27 @@ Circular struct with a uint8 field and a pointer to itself via %+v: {ui8:1 c:<*>(0xf84002d200){ui8:1 c:<*>(0xf84002d200)<shown>}} ``` +## Configuration Options + +``` +* spew.Config.MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + +* spew.Config.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 + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + +* spew.Config.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. +``` + ## License Go-spew is licensed under the liberal ISC License. |
