litter: Index | Files

package litter

import ""


Package Files

dump.go mapper.go print.go util.go


var Config = Options{
    StripPackageNames: false,
    HidePrivateFields: true,
    FieldExclusions:   regexp.MustCompile(`^(XXX_.*)$`),
    Separator:         " ",

Config is the default config used when calling Dump

func Dump Uses

func Dump(value ...interface{})

Dump a value to stdout

func MapReusedPointers Uses

func MapReusedPointers(v reflect.Value) []uintptr

MapReusedPointers : Given a structure, it will recurively map all pointers mentioned in the tree, breaking circular references and provide a list of all pointers that was referenced at least twice by the provided structure.

func Sdump Uses

func Sdump(value ...interface{}) string

Sdump dumps a value to a string

type Dumper Uses

type Dumper interface {
    LitterDump(w io.Writer)

Dumper is the interface for implementing custom dumper for your types.

type Options Uses

type Options struct {
    Compact           bool
    StripPackageNames bool
    HidePrivateFields bool
    HideZeroValues    bool
    FieldExclusions   *regexp.Regexp
    FieldFilter       func(reflect.StructField, reflect.Value) bool
    HomePackage       string
    Separator         string
    StrictGo          bool

Options represents configuration options for litter

func (Options) Dump Uses

func (o Options) Dump(values ...interface{})

Dump a value to stdout according to the options

func (Options) Sdump Uses

func (o Options) Sdump(values ...interface{}) string

Sdump dumps a value to a string according to the options

Package litter imports 10 packages (graph) and is imported by 28 packages. Updated 2020-01-23. Refresh now. Tools for package owners.