github.com/seeker-insurance/kit@v0.0.13/pretty/example_test.go (about) 1 package pretty_test 2 3 import ( 4 "fmt" 5 6 "github.com/seeker-insurance/kit/pretty" 7 ) 8 9 func Example() { 10 type myType struct { 11 a, b int 12 } 13 var x = []myType{{1, 2}, {3, 4}, {5, 6}} 14 fmt.Printf("%# v", pretty.Formatter(x)) 15 // output: 16 // []pretty_test.myType{ 17 // {a:1, b:2}, 18 // {a:3, b:4}, 19 // {a:5, b:6}, 20 // } 21 }