From f9d76718448815686718a5a8fae1c91fbf8f9a3c Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Thu, 10 Jan 2013 20:56:26 -0600 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 668f56b..2860e35 100644 --- a/README.md +++ b/README.md @@ -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)}} ``` +## 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.