helpers

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) bool

DirExists checks if a directory exists

func FileExists

func FileExists(filepath string) bool

FileExists checks if a file exists and is not a directory

func GetCaseInsensitiveMap

func GetCaseInsensitiveMap(dict *map[string]string) map[string]string

GetCaseInsensitiveMap coercs the map's keys to lower case, which only works when unicode char is in ASCII subset. May overwrite key-value pairs on different permutations of key case as in Key and key. DON'T force values to the lower case unconditionally, because values for keys such as mountpoint or keylocation are case-sensitive. Note that although keys such as 'comPREssion' are accepted and processed, even if they are technically invalid, updates to rectify such typing will be prohibited as a forbidden update.

func GetInsensitiveParameter

func GetInsensitiveParameter(dict *map[string]string, key string) string

GetInsensitiveParameter handles special case ofGetCaseInsensitiveMap looking up one key-value pair only

func IsValidUUID

func IsValidUUID(u string) bool

IsValidUUID validates whether a string is a valid UUID

Types

This section is empty.

Jump to

Keyboard shortcuts

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