util

package
v0.0.0-...-df093e9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDeepEqual

func AssertDeepEqual(t *testing.T, expectedStringMap, actualStringMap map[string]string) bool

AssertDeepEqual asserts two map[strings]string are equal

func DaysToHours

func DaysToHours(days int) time.Duration

DaysToHours returns the given number of days in hours

func HumanizedDurationString

func HumanizedDurationString(duration time.Duration) string

HumanizedDurationString returns a humanized string of a duration examples: 8h0m0s => 8 hours, 168h0m0s => 1 week

func LabelSetContains

func LabelSetContains(labelSet client.LabelSet, subLabelSet client.LabelSet) bool

LabelSetContains checks whether a LabelSet contains another LabelSet

func StringMapContains

func StringMapContains(stringMap map[string]string, str string) bool

StringMapContains checks whether a map[string]string contains a string.

func StringSliceContains

func StringSliceContains(stringSlice []string, searchString string) bool

StringSliceContains checks whether a string slice contains a string.

func TimeUntilNextMonday

func TimeUntilNextMonday(t0 time.Time) int

TimeUntilNextMonday returns the number of days until the next monday

Types

This section is empty.

Jump to

Keyboard shortcuts

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