compare

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(expected, actual interface{}, params CompareParams) []error

Compare compares values as plain text It can be compared several ways:

  • Pure values: should be equal
  • Regex: try to compile 'expected' as regex and match 'actual' with it It activates on following syntax: $matchRegexp(%EXPECTED_VALUE%)

Types

type CompareParams

type CompareParams struct {
	IgnoreValues         bool
	IgnoreArraysOrdering bool
	DisallowExtraFields  bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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