diff options
Diffstat (limited to 'spew.go')
| -rw-r--r-- | spew.go | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -4,24 +4,28 @@ package log -import ( +import ( "go.wit.com/dev/davecgh/spew" ) func Spew(b any, a ...any) { - if ! SPEW.Ok() { return } - if ! SPEW.b { return } + if !SPEW.Ok() { + return + } + if !SPEW.b { + return + } switch b.(type) { case bool: - if ! b.(bool) { + if !b.(bool) { return } realPrintln("SPEW:", spew.Sdump(a...)) case LogFlag: var f LogFlag f = b.(LogFlag) - if ! f.b { + if !f.b { return } realPrintln("SPEW:", spew.Sdump(a...)) @@ -31,11 +35,11 @@ func Spew(b any, a ...any) { } // realPrintln("SPEW:", spew.Sdump(a...)) /* - scs := spew.ConfigState{Indent: "\t", MaxDepth: 1} - // Output using the ConfigState instance. - v := map[string]int{"one": 1} - scs.Printf("v: %v\n", v) - scs.Dump(v) - scs.Dump(a) + scs := spew.ConfigState{Indent: "\t", MaxDepth: 1} + // Output using the ConfigState instance. + v := map[string]int{"one": 1} + scs.Printf("v: %v\n", v) + scs.Dump(v) + scs.Dump(a) */ } |
