structmatcher

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectStructsToMatch

func ExpectStructsToMatch(expected interface{}, actual interface{})

func ExpectStructsToMatchExcluding

func ExpectStructsToMatchExcluding(expected interface{}, actual interface{}, excludeFields ...string)

func ExpectStructsToMatchIncluding

func ExpectStructsToMatchIncluding(expected interface{}, actual interface{}, includeFields ...string)

func StructMatcher

func StructMatcher(expected interface{}, actual interface{}, shouldFilter bool, filterInclude bool, filterFields ...string) []string

* If fields are to be filtered in or out, set shouldFilter to true; filterInclude is true to * include fields or false to exclude fields, and filterFields contains the field names to filter on. * To filter on a field "fieldname" in struct "structname", pass in "fieldname". * To filter on a field "fieldname" in a nested struct under field "structfield", pass in "structfield.fieldname". * This function assumes structs will only ever be nested one level deep.

Types

This section is empty.

Jump to

Keyboard shortcuts

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