utils

package
v0.0.0-...-130476d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DaysBetween

func DaysBetween(fromTime, toTime time.Time) int

DaysBetween get the calendar days between two timestamp

func DeDupFilters

func DeDupFilters(filters map[string][]string)

Take out the duplicate entries if they exist.. not need to return the map.. maps are passed by ref. getting the duplicates out of the filters avoids the filtersQuery from becoming less efficient by having duplicate clauses. Duplicates in filter entries also make deep filtering impossible because deep filtering at the moment requires that we have exactly one profile and no controls or one profile and one control. If we have duplicates, it's easy to see why deep filtering would therefore, break.

func DiffArray

func DiffArray(a, b []string) (inANotB []string)

DiffArray - A util func that takes two string arrays (a and b), and returns an array containing elements that are in a but not b

func IsSafeUUID

func IsSafeUUID(uuid string) bool

Ensuring it only has valid UUID characters TODO: unit tests

func KvMatches

func KvMatches(matchKey string, matchVal string, kv *common.Kv) bool

func UniqueStringSlice

func UniqueStringSlice(stringSlice []string) []string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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