Documentation
¶
Index ¶
- func ArrayInsert[T any](slice []T, index int, value T) []T
- func ArrayRemove[T any](slice []T, index int) []T
- func ConfigFromJson[T interface{}](path string, output *T) error
- func ExecutableDir() string
- func FileExtension(file string) string
- func First[T any](first T, rest ...any) T
- func FixDirPath(path_in string) string
- func ForEach[T any](in []T, cb func(T))
- func MapArray[T any, U any](in []T, cb func(T) U) []U
- func MapContains[T comparable, U any](in map[T]U, key T) bool
- func MaxIndex[T cmp.Ordered](in []T) int
- func PanicOnErr(e error)
- func Second[T any](first any, second T, rest ...any) T
- type FileInfo
- type FileList
- type WaitTimer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayInsert ¶
func ArrayRemove ¶
func ConfigFromJson ¶
Takes in an input path to a json file and fills an output struct based on struct tags using json unmarshal
func ExecutableDir ¶
func ExecutableDir() string
func FileExtension ¶
func FixDirPath ¶
returns a fixed path, which means it ends with "/"
func MapContains ¶
func MapContains[T comparable, U any](in map[T]U, key T) bool
func PanicOnErr ¶
func PanicOnErr(e error)
Types ¶
type FileList ¶
type FileList []FileInfo
func FileListGlob ¶
keep or delete files what match a regex
type WaitTimer ¶
type WaitTimer struct {
// contains filtered or unexported fields
}
func CreateWaitTimer ¶
func (*WaitTimer) SetDuration ¶
Click to show internal directories.
Click to hide internal directories.