Documentation ¶
Index ¶
- func ArrayContains[T comparable](source []T, toCheck []T) bool
- func GetAsEqualsMap(em []string) map[string]string
- func GetAsStringList(em map[string]string) []string
- func MapKeys[T constraints.Ordered, U any](theMap map[T]U) []T
- func MapsAppend[T comparable, U any](target map[T]U, source map[T]U) map[T]U
- func RemoveDuplicates[T comparable](slice []T) []T
- func ResolveSymbolicLink(path string) (string, error)
- func StringToBool(s string) bool
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func ArrayContains[T comparable](source []T, toCheck []T) bool
func GetAsEqualsMap ¶
GetAsEqualsMap split key=value formatted strings into a key : value map
func GetAsStringList ¶
GetAsEqualsMap format a key : value map into key=value strings
func MapKeys ¶
func MapKeys[T constraints.Ordered, U any](theMap map[T]U) []T
func MapsAppend ¶
func MapsAppend[T comparable, U any](target map[T]U, source map[T]U) map[T]U
func RemoveDuplicates ¶
func RemoveDuplicates[T comparable](slice []T) []T
func ResolveSymbolicLink ¶ added in v2.1.4
ResolveSymbolicLink converts the section of an absolute path if it is a symbolic link
Parameters:
- path: an absolute path
Returns:
- converted path if it has a symbolic link or the same path if there is no symbolic link
func StringToBool ¶
StringToBool converts a string to a boolean ignoring errors
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
func NewSet ¶
func NewSet[T comparable](v ...T) Set[T]
Click to show internal directories.
Click to hide internal directories.