comparehelpers

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepContains

func DeepContains(container, containee interface{}) bool

Returns true if 'containee' is contained in 'container' Note this method searches all objects in 'container' for containee Contains is defined by the following relationship basic data types (string, float, int,...):

container == containee

maps:

every key-value pair from containee is in container
Ex: {"a": 1, "b": 2, "c": 3} contains {"a": 1, "c": 3}

arrays:

every element in containee is present and ordered in an array in container
Ex: [1, 1, 4, 3, 10, 4] contains [1, 3, 4 ]

Limitaions: Cannot handle the following types: Pointers, Func Assumes we are compairing structs generated from JSON, YAML, or TOML.

Types

This section is empty.

Jump to

Keyboard shortcuts

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