utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(s []string, v string) bool

ContainsString checks if `v` is present on slice `s`

func GetEventNumber

func GetEventNumber(fsys fs.FS) (int, error)

ReadEvent reads and parse event meta definition

func MergeDictionary

func MergeDictionary(dest *map[string]string, src *map[string]string)

MergeDictionary fills a map with entries from other map. if a key from map `src` already exists in map `dest`, the value for that key will be replaced

func ReadEnvBool

func ReadEnvBool(key string) bool

ReadEnvBool read and parse boolean environment variables. Will return `true` if the variable cannot be parsed

func ReadEnvString

func ReadEnvString(key string) string

ReadEnvString read string environment variables. This function is a wrapper function to 'os.Getenv()'

func ReadEnvStringArray

func ReadEnvStringArray(key string) []string

ReadEnvStringArray read an array of string environment variables. Must be comma-separated Automatically trims all values

func RemoveEntries

func RemoveEntries(src *map[string]string, exclusion []string)

RemoveEntries deletes all keys found in `exclusion` from `src`

Types

This section is empty.

Jump to

Keyboard shortcuts

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