From 3d738ee4c3d2e0e973fd20531e1a88d74139cc3b Mon Sep 17 00:00:00 2001 From: koyeo Date: Wed, 14 Dec 2022 20:38:21 +0800 Subject: [PATCH] update dep --- .travis.yml | 2 +- README.md | 12 ++--- spew/common_test.go | 12 ++--- spew/dump_test.go | 78 ++++++++++++++-------------- spew/dumpcgo_test.go | 15 +++--- spew/example_test.go | 48 +++++++++--------- spew/format_test.go | 86 +++++++++++++++---------------- test_coverage.txt | 118 +++++++++++++++++++++---------------------- 8 files changed, 186 insertions(+), 185 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82e742f..9acc582 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: go -go_import_path: github.com/davecgh/go-spew +go_import_path: github.com/gozelle/go-spew go: - 1.6.x - 1.7.x diff --git a/README.md b/README.md index f6ed02c..2da6e80 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,20 @@ post about it ## Documentation -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/davecgh/go-spew/spew) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/gozelle/go-spew/spew) Full `go doc` style documentation for the project can be viewed online without installing this package by using the excellent GoDoc site here: -http://godoc.org/github.com/davecgh/go-spew/spew +http://godoc.org/github.com/gozelle/go-spew/spew You can also view the documentation locally once the package is installed with the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to -http://localhost:6060/pkg/github.com/davecgh/go-spew/spew +http://localhost:6060/pkg/github.com/gozelle/go-spew/spew ## Installation ```bash -$ go get -u github.com/davecgh/go-spew/spew +$ go get -u github.com/gozelle/go-spew/spew ``` ## Quick Start @@ -39,7 +39,7 @@ $ go get -u github.com/davecgh/go-spew/spew Add this import line to the file you're working in: ```Go -import "github.com/davecgh/go-spew/spew" +import "github.com/gozelle/go-spew/spew" ``` To dump a variable with full newlines, indentation, type, and pointer @@ -75,7 +75,7 @@ import ( "html" "net/http" - "github.com/davecgh/go-spew/spew" + "github.com/gozelle/go-spew/spew" ) func handler(w http.ResponseWriter, r *http.Request) { diff --git a/spew/common_test.go b/spew/common_test.go index 0f5ce47..1ee593c 100644 --- a/spew/common_test.go +++ b/spew/common_test.go @@ -20,8 +20,8 @@ import ( "fmt" "reflect" "testing" - - "github.com/davecgh/go-spew/spew" + + "github.com/gozelle/go-spew/spew" ) // custom type to test Stinger interface on non-pointer receiver. @@ -139,7 +139,7 @@ func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T } return interfaces } - + for _, test := range tests { spew.SortValues(test.input, cs) // reflect.DeepEqual cannot really make sense of reflect.Value, @@ -158,7 +158,7 @@ func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T // works as intended. func TestSortValues(t *testing.T) { v := reflect.ValueOf - + a := v("a") b := v("b") c := v("c") @@ -232,7 +232,7 @@ func TestSortValues(t *testing.T) { // based sorting works as intended when using string methods. func TestSortValuesWithMethods(t *testing.T) { v := reflect.ValueOf - + a := v("a") b := v("b") c := v("c") @@ -267,7 +267,7 @@ func TestSortValuesWithMethods(t *testing.T) { // based sorting works as intended when using spew to stringify keys. func TestSortValuesWithSpew(t *testing.T) { v := reflect.ValueOf - + a := v("a") b := v("b") c := v("c") diff --git a/spew/dump_test.go b/spew/dump_test.go index 4a31a2e..4471ee3 100644 --- a/spew/dump_test.go +++ b/spew/dump_test.go @@ -66,8 +66,8 @@ import ( "fmt" "testing" "unsafe" - - "github.com/davecgh/go-spew/spew" + + "github.com/gozelle/go-spew/spew" ) // dumpTest is used to describe a test to be performed against the Dump method. @@ -99,7 +99,7 @@ func addIntDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Max int16. v2 := int16(32767) nv2 := (*int16)(nil) @@ -112,7 +112,7 @@ func addIntDumpTests() { addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") addDumpTest(nv2, "(*"+v2t+")()\n") - + // Max int32. v3 := int32(2147483647) nv3 := (*int32)(nil) @@ -125,7 +125,7 @@ func addIntDumpTests() { addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") addDumpTest(nv3, "(*"+v3t+")()\n") - + // Max int64. v4 := int64(9223372036854775807) nv4 := (*int64)(nil) @@ -138,7 +138,7 @@ func addIntDumpTests() { addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") addDumpTest(nv4, "(*"+v4t+")()\n") - + // Max int. v5 := int(2147483647) nv5 := (*int)(nil) @@ -166,7 +166,7 @@ func addUintDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Max uint16. v2 := uint16(65535) nv2 := (*uint16)(nil) @@ -179,7 +179,7 @@ func addUintDumpTests() { addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") addDumpTest(nv2, "(*"+v2t+")()\n") - + // Max uint32. v3 := uint32(4294967295) nv3 := (*uint32)(nil) @@ -192,7 +192,7 @@ func addUintDumpTests() { addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") addDumpTest(nv3, "(*"+v3t+")()\n") - + // Max uint64. v4 := uint64(18446744073709551615) nv4 := (*uint64)(nil) @@ -205,7 +205,7 @@ func addUintDumpTests() { addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") addDumpTest(nv4, "(*"+v4t+")()\n") - + // Max uint. v5 := uint(4294967295) nv5 := (*uint)(nil) @@ -233,7 +233,7 @@ func addBoolDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Boolean false. v2 := bool(false) pv2 := &v2 @@ -259,7 +259,7 @@ func addFloatDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Standard float64. v2 := float64(3.1415926) nv2 := (*float64)(nil) @@ -287,7 +287,7 @@ func addComplexDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Standard complex128. v2 := complex(float64(-6), 2) nv2 := (*complex128)(nil) @@ -318,7 +318,7 @@ func addArrayDumpTests() { addDumpTest(pv, "(*[3]"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**[3]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*[3]"+vt+")()\n") - + // Array containing type with custom formatter on pointer receiver only. v2i0 := pstringer("1") v2i1 := pstringer("2") @@ -349,7 +349,7 @@ func addArrayDumpTests() { addDumpTest(pv2, "(*[3]"+v2t+")("+v2Addr+")("+v2sp+")\n") addDumpTest(&pv2, "(**[3]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2sp+")\n") addDumpTest(nv2, "(*[3]"+v2t+")()\n") - + // Array containing interfaces. v3i0 := "one" v3 := [3]interface{}{v3i0, int(2), uint(3)} @@ -371,7 +371,7 @@ func addArrayDumpTests() { addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") addDumpTest(nv3, "(*"+v3t+")()\n") - + // Array containing bytes. v4 := [34]byte{ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, @@ -416,7 +416,7 @@ func addSliceDumpTests() { addDumpTest(pv, "(*[]"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**[]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*[]"+vt+")()\n") - + // Slice containing type with custom formatter on pointer receiver only. v2i0 := pstringer("1") v2i1 := pstringer("2") @@ -440,7 +440,7 @@ func addSliceDumpTests() { addDumpTest(pv2, "(*[]"+v2t+")("+v2Addr+")("+v2s+")\n") addDumpTest(&pv2, "(**[]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") addDumpTest(nv2, "(*[]"+v2t+")()\n") - + // Slice containing interfaces. v3i0 := "one" v3 := []interface{}{v3i0, int(2), uint(3), nil} @@ -463,7 +463,7 @@ func addSliceDumpTests() { addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") addDumpTest(nv3, "(*"+v3t+")()\n") - + // Slice containing bytes. v4 := []byte{ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, @@ -490,7 +490,7 @@ func addSliceDumpTests() { addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") addDumpTest(nv4, "(*"+v4t+")()\n") - + // Nil slice. v5 := []int(nil) nv5 := (*[]int)(nil) @@ -534,7 +534,7 @@ func addInterfaceDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Sub-interface. v2 := interface{}(uint16(65535)) pv2 := &v2 @@ -576,7 +576,7 @@ func addMapDumpTests() { "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms2+")\n") addDumpTest(nm, "(*"+mt+")()\n") addDumpTest(nilMap, "("+mt+") \n") - + // Map with custom formatter type on pointer receiver only keys and vals. k2 := pstringer("one") v2 := pstringer("1") @@ -604,7 +604,7 @@ func addMapDumpTests() { addDumpTest(&pm2, "(**"+m2t+")("+pm2Addr+"->"+m2Addr+")("+m2s+")\n") addDumpTest(nm2, "(*"+m2t+")()\n") addDumpTest(nilMap2, "("+m2t+") \n") - + // Map with interface keys and values. k3 := "one" k3Len := fmt.Sprintf("%d", len(k3)) @@ -625,7 +625,7 @@ func addMapDumpTests() { addDumpTest(&pm3, "(**"+m3t+")("+pm3Addr+"->"+m3Addr+")("+m3s+")\n") addDumpTest(nm3, "(*"+m3t+")()\n") addDumpTest(nilMap3, "("+m3t+") \n") - + // Map with nil interface value. k4 := "nil" k4Len := fmt.Sprintf("%d", len(k4)) @@ -667,7 +667,7 @@ func addStructDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Struct that contains another struct. type s2 struct { s1 s1 @@ -689,7 +689,7 @@ func addStructDumpTests() { addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") addDumpTest(nv2, "(*"+v2t+")()\n") - + // Struct that contains custom type with Stringer pointer interface via both // exported and unexported fields. type s3 struct { @@ -716,7 +716,7 @@ func addStructDumpTests() { addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3sp+")\n") addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3sp+")\n") addDumpTest(nv3, "(*"+v3t+")()\n") - + // Struct that contains embedded struct and field to same struct. e := embed{"embedstr"} eLen := fmt.Sprintf("%d", len("embedstr")) @@ -750,7 +750,7 @@ func addUintptrDumpTests() { addDumpTest(v, "("+vt+") "+vs+"\n") addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - + // Address of real variable. i := 1 v2 := uintptr(unsafe.Pointer(&i)) @@ -779,7 +779,7 @@ func addUnsafePointerDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Address of real variable. i := 1 v2 := unsafe.Pointer(&i) @@ -807,7 +807,7 @@ func addChanDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Real channel. v2 := make(chan int) pv2 := &v2 @@ -833,7 +833,7 @@ func addFuncDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") addDumpTest(nv, "(*"+vt+")()\n") - + // Function with param and no returns. v2 := TestDump nv2 := (*func(*testing.T))(nil) @@ -846,7 +846,7 @@ func addFuncDumpTests() { addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") addDumpTest(nv2, "(*"+v2t+")()\n") - + // Function with multiple params and multiple returns. var v3 = func(i int, s string) (b bool, err error) { return true, nil @@ -880,7 +880,7 @@ func addCircularDumpTests() { addDumpTest(v, "("+vt+") "+vs+"\n") addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs2+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs2+")\n") - + // Structs that are circular through cross referencing. v2 := xref1{nil} ts2 := xref2{&v2} @@ -899,7 +899,7 @@ func addCircularDumpTests() { addDumpTest(v2, "("+v2t+") "+v2s+"\n") addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s2+")\n") addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s2+")\n") - + // Structs that are indirectly circular. v3 := indirCir1{nil} tic2 := indirCir2{nil} @@ -978,7 +978,7 @@ func TestDump(t *testing.T) { addPanicDumpTests() addErrorDumpTests() addCgoDumpTests() - + t.Logf("Running %d tests", len(dumpTests)) for i, test := range dumpTests { buf := new(bytes.Buffer) @@ -1001,7 +1001,7 @@ func TestDumpSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) } - + s = cfg.Sdump(map[stringer]int{"1": 1, "3": 3, "2": 2}) expected = "(map[spew_test.stringer]int) (len=3) {\n" + "(spew_test.stringer) (len=1) stringer 1: (int) 1,\n" + @@ -1011,7 +1011,7 @@ func TestDumpSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) } - + s = cfg.Sdump(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) expected = "(map[spew_test.pstringer]int) (len=3) {\n" + "(spew_test.pstringer) (len=1) stringer 1: (int) 1,\n" + @@ -1028,7 +1028,7 @@ func TestDumpSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) } - + s = cfg.Sdump(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) expected = "(map[spew_test.customError]int) (len=3) {\n" + "(spew_test.customError) error: 1: (int) 1,\n" + @@ -1038,5 +1038,5 @@ func TestDumpSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) } - + } diff --git a/spew/dumpcgo_test.go b/spew/dumpcgo_test.go index 108baa5..75940d9 100644 --- a/spew/dumpcgo_test.go +++ b/spew/dumpcgo_test.go @@ -19,14 +19,15 @@ // does not require cgo to run even though it does handle certain cgo types // specially. Rather than forcing all clients to require cgo and an external // C compiler just to run the tests, this scheme makes them optional. +//go:build cgo && testcgo // +build cgo,testcgo package spew_test import ( "fmt" - - "github.com/davecgh/go-spew/spew/testdata" + + "github.com/gozelle/go-spew/spew/testdata" ) func addCgoDumpTests() { @@ -43,7 +44,7 @@ func addCgoDumpTests() { addDumpTest(pv, "(*"+vt+")("+vAddr+"->"+vcAddr+")("+vs+")\n") addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+"->"+vcAddr+")("+vs+")\n") addDumpTest(nv, "("+vt+")()\n") - + // C char array. v2, v2l, v2c := testdata.GetCgoCharArray() v2Len := fmt.Sprintf("%d", v2l) @@ -53,7 +54,7 @@ func addCgoDumpTests() { "{\n 00000000 74 65 73 74 32 00 " + " |test2.|\n}" addDumpTest(v2, "("+v2t+") "+v2s+"\n") - + // C unsigned char array. v3, v3l, v3c := testdata.GetCgoUnsignedCharArray() v3Len := fmt.Sprintf("%d", v3l) @@ -64,7 +65,7 @@ func addCgoDumpTests() { "{\n 00000000 74 65 73 74 33 00 " + " |test3.|\n}" addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n") - + // C signed char array. v4, v4l, v4c := testdata.GetCgoSignedCharArray() v4Len := fmt.Sprintf("%d", v4l) @@ -76,7 +77,7 @@ func addCgoDumpTests() { ") 115,\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 52,\n (" + v4t2 + ") 0\n}" addDumpTest(v4, "("+v4t+") "+v4s+"\n") - + // C uint8_t array. v5, v5l, v5c := testdata.GetCgoUint8tArray() v5Len := fmt.Sprintf("%d", v5l) @@ -87,7 +88,7 @@ func addCgoDumpTests() { "{\n 00000000 74 65 73 74 35 00 " + " |test5.|\n}" addDumpTest(v5, "("+v5t+") "+v5s+"\n", "("+v5t2+") "+v5s+"\n") - + // C typedefed unsigned char array. v6, v6l, v6c := testdata.GetCgoTypdefedUnsignedCharArray() v6Len := fmt.Sprintf("%d", v6l) diff --git a/spew/example_test.go b/spew/example_test.go index c6ec8c6..6e55dfa 100644 --- a/spew/example_test.go +++ b/spew/example_test.go @@ -18,8 +18,8 @@ package spew_test import ( "fmt" - - "github.com/davecgh/go-spew/spew" + + "github.com/gozelle/go-spew/spew" ) type Flag int @@ -55,34 +55,34 @@ func ExampleDump() { // The following package level declarations are assumed for this example: /* type Flag int - + const ( flagOne Flag = iota flagTwo ) - + var flagStrings = map[Flag]string{ flagOne: "flagOne", flagTwo: "flagTwo", } - + func (f Flag) String() string { if s, ok := flagStrings[f]; ok { return s } return fmt.Sprintf("Unknown flag (%d)", int(f)) } - + type Bar struct { data uintptr } - + type Foo struct { unexportedField Bar ExportedField map[interface{}]interface{} } */ - + // Setup some sample data structures for the example. bar := Bar{uintptr(0)} s1 := Foo{bar, map[interface{}]interface{}{"one": true}} @@ -94,10 +94,10 @@ func ExampleDump() { 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, } - + // Dump! spew.Dump(s1, f, b) - + // Output: // (spew_test.Foo) { // unexportedField: (spew_test.Bar) { @@ -123,7 +123,7 @@ func ExamplePrintf() { ui8 := uint8(5) pui8 := &ui8 ppui8 := &pui8 - + // Create a circular data type. type circular struct { ui8 uint8 @@ -131,11 +131,11 @@ func ExamplePrintf() { } c := circular{ui8: 1} c.c = &c - + // Print! spew.Printf("ppui8: %v\n", ppui8) spew.Printf("circular: %v\n", c) - + // Output: // ppui8: <**>5 // circular: {1 <*>{1 <*>}} @@ -146,12 +146,12 @@ func ExampleConfigState() { // Modify the indent level of the ConfigState only. The global // configuration is not modified. scs := spew.ConfigState{Indent: "\t"} - + // Output using the ConfigState instance. v := map[string]int{"one": 1} scs.Printf("v: %v\n", v) scs.Dump(v) - + // Output: // v: map[one:1] // (map[string]int) (len=1) { @@ -164,19 +164,19 @@ func ExampleConfigState() { func ExampleConfigState_Dump() { // See the top-level Dump example for details on the types used in this // example. - + // Create two ConfigState instances with different indentation. scs := spew.ConfigState{Indent: "\t"} scs2 := spew.ConfigState{Indent: " "} - + // Setup some sample data structures for the example. bar := Bar{uintptr(0)} s1 := Foo{bar, map[interface{}]interface{}{"one": true}} - + // Dump using the ConfigState instances. scs.Dump(s1) scs2.Dump(s1) - + // Output: // (spew_test.Foo) { // unexportedField: (spew_test.Bar) { @@ -202,24 +202,24 @@ func ExampleConfigState_Dump() { func ExampleConfigState_Printf() { // See the top-level Dump example for details on the types used in this // example. - + // Create two ConfigState instances and modify the method handling of the // first ConfigState only. scs := spew.NewDefaultConfig() scs2 := spew.NewDefaultConfig() scs.DisableMethods = true - + // Alternatively // scs := spew.ConfigState{Indent: " ", DisableMethods: true} // scs2 := spew.ConfigState{Indent: " "} - + // This is of type Flag which implements a Stringer and has raw value 1. f := flagTwo - + // Dump using the ConfigState instances. scs.Printf("f: %v\n", f) scs2.Printf("f: %v\n", f) - + // Output: // f: 1 // f: flagTwo diff --git a/spew/format_test.go b/spew/format_test.go index 87ee965..bba4bbf 100644 --- a/spew/format_test.go +++ b/spew/format_test.go @@ -71,8 +71,8 @@ import ( "fmt" "testing" "unsafe" - - "github.com/davecgh/go-spew/spew" + + "github.com/gozelle/go-spew/spew" ) // formatterTest is used to describe a test to be performed against NewFormatter. @@ -117,7 +117,7 @@ func addIntFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Max int16. v2 := int16(32767) nv2 := (*int16)(nil) @@ -142,7 +142,7 @@ func addIntFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Max int32. v3 := int32(2147483647) nv3 := (*int32)(nil) @@ -167,7 +167,7 @@ func addIntFormatterTests() { addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - + // Max int64. v4 := int64(9223372036854775807) nv4 := (*int64)(nil) @@ -192,7 +192,7 @@ func addIntFormatterTests() { addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - + // Max int. v5 := int(2147483647) nv5 := (*int)(nil) @@ -244,7 +244,7 @@ func addUintFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Max uint16. v2 := uint16(65535) nv2 := (*uint16)(nil) @@ -269,7 +269,7 @@ func addUintFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Max uint32. v3 := uint32(4294967295) nv3 := (*uint32)(nil) @@ -294,7 +294,7 @@ func addUintFormatterTests() { addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - + // Max uint64. v4 := uint64(18446744073709551615) nv4 := (*uint64)(nil) @@ -319,7 +319,7 @@ func addUintFormatterTests() { addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - + // Max uint. v5 := uint(4294967295) nv5 := (*uint)(nil) @@ -371,7 +371,7 @@ func addBoolFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Boolean false. v2 := bool(false) pv2 := &v2 @@ -418,7 +418,7 @@ func addFloatFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Standard float64. v2 := float64(3.1415926) nv2 := (*float64)(nil) @@ -470,7 +470,7 @@ func addComplexFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Standard complex128. v2 := complex(float64(-6), 2) nv2 := (*complex128)(nil) @@ -522,7 +522,7 @@ func addArrayFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Array containing type with custom formatter on pointer receiver only. v2 := [3]pstringer{"1", "2", "3"} nv2 := (*[3]pstringer)(nil) @@ -551,7 +551,7 @@ func addArrayFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2sp) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2sp) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Array containing interfaces. v3 := [3]interface{}{"one", int(2), uint(3)} nv3 := (*[3]interface{})(nil) @@ -607,7 +607,7 @@ func addSliceFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Slice containing type with custom formatter on pointer receiver only. v2 := []pstringer{"1", "2", "3"} nv2 := (*[]pstringer)(nil) @@ -632,7 +632,7 @@ func addSliceFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Slice containing interfaces. v3 := []interface{}{"one", int(2), uint(3), nil} nv3 := (*[]interface{})(nil) @@ -663,7 +663,7 @@ func addSliceFormatterTests() { addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - + // Nil slice. var v4 []int nv4 := (*[]int)(nil) @@ -742,7 +742,7 @@ func addInterfaceFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Sub-interface. v2 := interface{}(uint16(65535)) pv2 := &v2 @@ -798,7 +798,7 @@ func addMapFormatterTests() { "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs2) addFormatterTest("%#+v", nilMap, "("+vt+")"+"") addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Map with custom formatter type on pointer receiver only keys and vals. v2 := map[pstringer]pstringer{"one": "1"} nv2 := (*map[pstringer]pstringer)(nil) @@ -826,7 +826,7 @@ func addMapFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Map with interface keys and values. v3 := map[interface{}]interface{}{"one": 1} nv3 := (*map[interface{}]interface{})(nil) @@ -854,7 +854,7 @@ func addMapFormatterTests() { addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - + // Map with nil interface value v4 := map[string]interface{}{"nil": nil} nv4 := (*map[string]interface{})(nil) @@ -916,7 +916,7 @@ func addStructFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs3) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs3) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Struct that contains another struct. type s2 struct { s1 s1 @@ -952,7 +952,7 @@ func addStructFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s3) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s3) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Struct that contains custom type with Stringer pointer interface via both // exported and unexported fields. type s3 struct { @@ -996,7 +996,7 @@ func addStructFormatterTests() { addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s3p) addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s3p) addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - + // Struct that contains embedded struct and field to same struct. e := embed{"embedstr"} v4 := embedwrap{embed: &e, e: &e} @@ -1058,7 +1058,7 @@ func addUintptrFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Address of real variable. i := 1 v2 := uintptr(unsafe.Pointer(&i)) @@ -1106,7 +1106,7 @@ func addUnsafePointerFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Address of real variable. i := 1 v2 := unsafe.Pointer(&i) @@ -1154,7 +1154,7 @@ func addChanFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Real channel. v2 := make(chan int) pv2 := &v2 @@ -1201,7 +1201,7 @@ func addFuncFormatterTests() { addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - + // Function with param and no returns. v2 := TestFormatter nv2 := (*func(*testing.T))(nil) @@ -1226,7 +1226,7 @@ func addFuncFormatterTests() { addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - + // Function with multiple params and multiple returns. var v3 = func(i int, s string) (b bool, err error) { return true, nil @@ -1287,7 +1287,7 @@ func addCircularFormatterTests() { addFormatterTest("%#+v", v, "("+vt+")"+vs7) addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs8) addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs8) - + // Structs that are circular through cross referencing. v2 := xref1{nil} ts2 := xref2{&v2} @@ -1323,7 +1323,7 @@ func addCircularFormatterTests() { addFormatterTest("%#+v", v2, "("+v2t+")"+v2s7) addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s8) addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s8) - + // Structs that are indirectly circular. v3 := indirCir1{nil} tic2 := indirCir2{nil} @@ -1431,7 +1431,7 @@ func addPassthroughFormatterTests() { addFormatterTest("%x", v, vs) addFormatterTest("%x", pv, vAddr) addFormatterTest("%x", &pv, pvAddr) - + // %#x passthrough with uint. v2 := int(2147483647) pv2 := &v2 @@ -1441,22 +1441,22 @@ func addPassthroughFormatterTests() { addFormatterTest("%#x", v2, v2s) addFormatterTest("%#x", pv2, v2Addr) addFormatterTest("%#x", &pv2, pv2Addr) - + // %f passthrough with precision. addFormatterTest("%.2f", 3.1415, "3.14") addFormatterTest("%.3f", 3.1415, "3.142") addFormatterTest("%.4f", 3.1415, "3.1415") - + // %f passthrough with width and precision. addFormatterTest("%5.2f", 3.1415, " 3.14") addFormatterTest("%6.3f", 3.1415, " 3.142") addFormatterTest("%7.4f", 3.1415, " 3.1415") - + // %d passthrough with width. addFormatterTest("%3d", 127, "127") addFormatterTest("%4d", 127, " 127") addFormatterTest("%5d", 127, " 127") - + // %q passthrough with string. addFormatterTest("%q", "test", "\"test\"") } @@ -1483,7 +1483,7 @@ func TestFormatter(t *testing.T) { addPanicFormatterTests() addErrorFormatterTests() addPassthroughFormatterTests() - + t.Logf("Running %d tests", len(formatterTests)) for i, test := range formatterTests { buf := new(bytes.Buffer) @@ -1520,13 +1520,13 @@ func TestPrintSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch 1:\n %v %v", s, expected) } - + s = cfg.Sprint(map[stringer]int{"1": 1, "3": 3, "2": 2}) expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" if s != expected { t.Errorf("Sorted keys mismatch 2:\n %v %v", s, expected) } - + s = cfg.Sprint(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" if spew.UnsafeDisabled { @@ -1535,13 +1535,13 @@ func TestPrintSortedKeys(t *testing.T) { if s != expected { t.Errorf("Sorted keys mismatch 3:\n %v %v", s, expected) } - + s = cfg.Sprint(map[testStruct]int{{1}: 1, {3}: 3, {2}: 2}) expected = "map[ts.1:1 ts.2:2 ts.3:3]" if s != expected { t.Errorf("Sorted keys mismatch 4:\n %v %v", s, expected) } - + if !spew.UnsafeDisabled { s = cfg.Sprint(map[testStructP]int{{1}: 1, {3}: 3, {2}: 2}) expected = "map[ts.1:1 ts.2:2 ts.3:3]" @@ -1549,7 +1549,7 @@ func TestPrintSortedKeys(t *testing.T) { t.Errorf("Sorted keys mismatch 5:\n %v %v", s, expected) } } - + s = cfg.Sprint(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) expected = "map[error: 1:1 error: 2:2 error: 3:3]" if s != expected { diff --git a/test_coverage.txt b/test_coverage.txt index 2cd087a..473de3e 100644 --- a/test_coverage.txt +++ b/test_coverage.txt @@ -1,61 +1,61 @@ -github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) -github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82) -github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) -github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30) -github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18) -github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) -github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) -github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11) -github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11) -github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10) -github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) -github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) -github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) -github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) -github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4) -github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) -github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1) -github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505) +github.com/gozelle/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) +github.com/gozelle/go-spew/spew/format.go formatState.format 100.00% (82/82) +github.com/gozelle/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) +github.com/gozelle/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) +github.com/gozelle/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) +github.com/gozelle/go-spew/spew/common.go handleMethods 100.00% (30/30) +github.com/gozelle/go-spew/spew/common.go printHexPtr 100.00% (18/18) +github.com/gozelle/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) +github.com/gozelle/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) +github.com/gozelle/go-spew/spew/dump.go fdump 100.00% (11/11) +github.com/gozelle/go-spew/spew/format.go formatState.Format 100.00% (11/11) +github.com/gozelle/go-spew/spew/common.go init 100.00% (10/10) +github.com/gozelle/go-spew/spew/common.go printComplex 100.00% (9/9) +github.com/gozelle/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) +github.com/gozelle/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) +github.com/gozelle/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) +github.com/gozelle/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) +github.com/gozelle/go-spew/spew/common.go catchPanic 100.00% (4/4) +github.com/gozelle/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) +github.com/gozelle/go-spew/spew/spew.go convertArgs 100.00% (4/4) +github.com/gozelle/go-spew/spew/format.go newFormatter 100.00% (3/3) +github.com/gozelle/go-spew/spew/dump.go Sdump 100.00% (3/3) +github.com/gozelle/go-spew/spew/common.go printBool 100.00% (3/3) +github.com/gozelle/go-spew/spew/common.go sortValues 100.00% (3/3) +github.com/gozelle/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) +github.com/gozelle/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) +github.com/gozelle/go-spew/spew/spew.go Printf 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Println 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Sprint 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Sprintf 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Sprintln 100.00% (1/1) +github.com/gozelle/go-spew/spew/common.go printFloat 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) +github.com/gozelle/go-spew/spew/common.go printInt 100.00% (1/1) +github.com/gozelle/go-spew/spew/common.go printUint 100.00% (1/1) +github.com/gozelle/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) +github.com/gozelle/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) +github.com/gozelle/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) +github.com/gozelle/go-spew/spew/dump.go Fdump 100.00% (1/1) +github.com/gozelle/go-spew/spew/dump.go Dump 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Fprintln 100.00% (1/1) +github.com/gozelle/go-spew/spew/format.go NewFormatter 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Errorf 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Fprint 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Fprintf 100.00% (1/1) +github.com/gozelle/go-spew/spew/spew.go Print 100.00% (1/1) +github.com/gozelle/go-spew/spew ------------------------------- 100.00% (505/505)