filter

package
v0.0.0-...-a7f85cb Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationSmallerEqual

func DurationSmallerEqual(orig, cmp string) bool

func JSON

func JSON(items []*gabs.Container, filters ...JSONFilter) []*gabs.Container

Filtering the JSON with OR between filters, but AND between the 'Matching' field inside the filter struct

func StrEqual

func StrEqual(orig, cmp string) bool

func StrNotContains

func StrNotContains(orig, cmp string) bool

func StrNotEqual

func StrNotEqual(orig, cmp string) bool

Types

type ComparisonFunc

type ComparisonFunc func(originalValue string, expectedValue string) bool

type JSONFilter

type JSONFilter struct {
	Matching       map[string]string // A map between json path to the value it will be compared to. The relation between them is AND
	ComparisonFunc ComparisonFunc
}

Jump to

Keyboard shortcuts

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