package dump
Import Path
github.com/gookit/goutil/dump (on go.dev)
Dependency Relation
imports 13 packages, and imported by one package
Involved Source Files
Package dump like fmt.Println but more pretty and beautiful print Go values.
dumper.go
options.go
Package-Level Type Names (total 4)
Dumper struct definition
Options *Options
BytesAsString dump handle.
CallerSkip skip for call runtime.Caller()
ColorTheme for print result.
IndentChar default is one space
IndentLen width. default is 2
MaxDepth for nested print
MoreLenNL array/slice elements length > MoreLenNL, will wrap new line
MoreLenNL int
MaxElementsNum for a long-long slice or array. The excess will be displayed `...`
NoColor don't with color
NoType don't show data type TODO
Output the output writer
ShowFlag for display caller position
ShowLen display length information for string, slice, array, map
SkipNilField value dump on map, struct.
SkipPrivate field dump on struct.
Dump vars
Fprint print vars to io.Writer
Print vars. alias of Dump()
Println vars. alias of Dump()
ResetOptions for dumper
WithOptions for dumper
WithSkip for dumper
WithoutColor for dumper
*Dumper : github.com/go-sql-driver/mysql.Logger
func NewDumper(out io.Writer, skip int) *Dumper
func NewWithOptions(fns ...OptionFunc) *Dumper
func Std() *Dumper
func Std2() *Dumper
func (*Dumper).WithOptions(fns ...OptionFunc) *Dumper
func (*Dumper).WithoutColor() *Dumper
func (*Dumper).WithSkip(skip int) *Dumper
OptionFunc type
func BytesAsString() OptionFunc
func SkipNilField() OptionFunc
func SkipPrivate() OptionFunc
func WithCallerSkip(skip int) OptionFunc
func WithoutColor() OptionFunc
func WithoutLen() OptionFunc
func WithoutOutput(out io.Writer) OptionFunc
func WithoutPosition() OptionFunc
func WithoutType() OptionFunc
func Config(fns ...OptionFunc)
func NewWithOptions(fns ...OptionFunc) *Dumper
func (*Dumper).WithOptions(fns ...OptionFunc) *Dumper
Options for dumper
BytesAsString dump handle.
CallerSkip skip for call runtime.Caller()
ColorTheme for print result.
IndentChar default is one space
IndentLen width. default is 2
MaxDepth for nested print
MoreLenNL array/slice elements length > MoreLenNL, will wrap new line
MoreLenNL int
MaxElementsNum for a long-long slice or array. The excess will be displayed `...`
NoColor don't with color
NoType don't show data type TODO
Output the output writer
ShowFlag for display caller position
ShowLen display length information for string, slice, array, map
SkipNilField value dump on map, struct.
SkipPrivate field dump on struct.
func NewDefaultOptions(out io.Writer, skip int) *Options
Theme color code/tag map for dump
Package-Level Functions (total 25)
BytesAsString setting.
Clear dump clear data, without location.
Config std dumper
Format like fmt.Println, but the output is clearer and more beautiful
Fprint like fmt.Println, but the output is clearer and more beautiful
NewDefaultOptions create.
NewDumper create
NewWithOptions create
NoLoc dump vars data, without location.
P like fmt.Println, but the output is clearer and more beautiful
Print like fmt.Println, but the output is clearer and more beautiful
Println like fmt.Println, but the output is clearer and more beautiful
Reset std dumper
Reset2 reset std2 dumper
SkipNilField setting.
SkipPrivate field dump on struct.
Std dumper
Std2 dumper
V like fmt.Println, but the output is clearer and more beautiful
WithCallerSkip on print caller position information.
WithoutColor setting.
WithoutLen setting. hide length information for string, slice, array, map.
WithoutOutput setting.
WithoutPosition dont print call dump position information.
WithoutType setting.
Package-Level Constants (total 5)
These flags define which print caller information
These flags define which print caller information
These flags define which print caller information
These flags define which print caller information
These flags define which print caller information
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |