Documentation ¶
Overview ¶
Package dump like fmt.Println but more clear and beautiful print data.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = dumpConfig{ ShowMethod: true, MoreLenNL: 8, }
Config dump data settings
View Source
var Output io.Writer = os.Stdout
Output set print content to the io.Writer
Functions ¶
func Print ¶
func Print(vs ...interface{})
Print like fmt.Println, but the output is clearer and more beautiful
Example ¶
Config.NoColor = true Print( 23, []string{"ab", "cd"}, []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, map[string]string{"key": "val"}, map[string]interface{}{ "sub": map[string]string{"k": "v"}, }, struct { ab string Cd int }{ "ab", 23, }, ) Config.NoColor = false // Output like: // PRINT AT github.com/gookit/goutil/dump.ExamplePrint(LINE 14): // int(23) // []string{"ab", "cd"} // []int [ // 1, // 2, // 3, // 4, // 5, // 6, // 7, // 8, // 9, // 10, // 11, // ] // map[string]string { // key: "val", // } // map[string]interface {} { // sub: map[string]string{"k":"v"}, // } // struct { ab string; Cd int } { // ab: "ab", // Cd: 23, // } //
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.