util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureBaseDirectoriesExist

func EnsureBaseDirectoriesExist(path string) error

func GenerateCorrelation

func GenerateCorrelation() string

func GetHomeDir

func GetHomeDir() string

func IsEmpty

func IsEmpty(source interface{}) bool

func SliceContains

func SliceContains[T comparable](sourceSlice []T, item T) bool

func SliceItem

func SliceItem[T any](sourceSlice []T,
	contains func(e T) bool,
	value func(e T) T) (bool, T)

For an slice of any Type, we can check if is there any element based on a custom contains function if contains is true we can get the element based on a custom value function

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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