halp

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FloatPrecision   OptName = "FloatPrecision"
	MaxDiff          OptName = "MaxDiff"
	MaxDepth         OptName = "MaxDepth"
	LogErrors        OptName = "LogErrors"
	LookupUnexported OptName = "LookupUnexported"
	IncludeNilSlices OptName = "IncludeNilSlices"

	DefaultFloatPrecision int = 10
	DefaultMaxDiff        int = 10
)

Variables

View Source
var (
	DefaultOpts = PrintOpts{
		SkipPackage: true,
		SkipPrivate: true,
		SkipZero:    true,
		Excludes:    []*regexp.Regexp{regexp.MustCompile(`^(XXX_.*)$`)},
		Separator:   " ",
	}
)

Functions

func Equal

func Equal(actual, expected interface{}, opts ...CompareOptions) []string

func MapReusedPointers

func MapReusedPointers(value reflect.Value) []uintptr

func Print

func Print(value ...interface{})

func SPrint

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

Types

type CompareOptions

type CompareOptions struct {
	Name  OptName
	Value interface{}
}

type OptName

type OptName string

type PrintOpts

type PrintOpts struct {
	MainPackage string
	Separator   string
	WillCompact bool
	WithFuncs   bool
	SkipPackage bool
	SkipPrivate bool
	SkipZero    bool
	Excludes    []*regexp.Regexp
	FieldFilter func(reflect.StructField, reflect.Value) bool
}

func (PrintOpts) Print

func (o PrintOpts) Print(values ...interface{})

func (PrintOpts) SPrint

func (o PrintOpts) SPrint(values ...interface{}) string

type Printer

type Printer interface {
	Print(w io.Writer)
}

Jump to

Keyboard shortcuts

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