dump

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2019 License: MIT Imports: 6 Imported by: 95

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 = struct {
	NoPosition bool
	ShowMethod bool
	ShowFile   bool
	NoColor    bool
}{
	ShowMethod: true,
}

Config dump data

Functions

func Fprint

func Fprint(skip int, w io.Writer, vs ...interface{})

Fprint like fmt.Println, but the output is clearer and more beautiful

func P

func P(vs ...interface{})

P like fmt.Println, but the output is clearer and more beautiful

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:

PRINT AT github.com/gookit/goutil/dump.ExamplePrint(LINE 13):
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,
}

func Println

func Println(vs ...interface{})

Println like fmt.Println, but the output is clearer and more beautiful

func ResetConfig

func ResetConfig()

ResetConfig reset config data

func V

func V(vs ...interface{})

V like fmt.Println, but the output is clearer and more beautiful

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL