util

package
v0.0.0-...-b02bee7 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: EPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](items []T, item T) bool

Returns true iff any element of the first parameter is equal to the second parameter

func InitLogger

func InitLogger(logFormat string, logFile string, logLevel string)

func LookupEnv

func LookupEnv[T LookupValid](env string, defaultValue T) T

func SortedKeys

func SortedKeys[K constraints.Ordered, V any](m map[K]V) []K

Returns a sorted slice of the keys of the given map

Types

type LookupValid

type LookupValid interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~float32 | ~float64 |
		~string |
		~bool
}

Jump to

Keyboard shortcuts

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