utils

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataFromSliceOrFile

func DataFromSliceOrFile(data []byte, file string) ([]byte, error)

DataFromSliceOrFile returns data from the slice (if non-empty), or from the file, or an error if an error occurred reading the file

func IsAllowed

func IsAllowed(allowList []string, value string) bool

IsAllowed returns true in case the allowList is empty or if the value is included in the list

func ToFnvHash

func ToFnvHash(value string) (string, error)

Types

type Set

type Set map[string]string

Set is a map of label:value. It implements Labels.

func MergeStringMap

func MergeStringMap(map1 Set, map2 Set) Set

MergeStringMap combines given maps, and does not check for any conflicts between the maps. In case of conflicts, second map (map2) wins

Jump to

Keyboard shortcuts

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