Documentation
¶
Index ¶
- func AlphaMapKeys[V any](m map[string]V) []string
- func Contains[T comparable](xs []T, x T) bool
- func CopyFile(sourcePath, destPath string) error
- func GetLocalIp() (net.IP, error)
- func InfoPrompt(prompt string)
- func IsEmptyDir(path string) (bool, error)
- func IsZip(path string) bool
- func ListZip(path string) ([]string, error)
- func MapKeys[K comparable, V any](m map[K]V) []K
- func Max[T constraints.Ordered](xs []T) T
- func Md5Sum(path string) (string, error)
- func Min[T constraints.Ordered](xs []T) T
- func MoveFile(sourcePath, destPath string) error
- func RandomElem[T any](xs []T) (T, error)
- func RemoveEmptyDirs(path string) error
- func RemoveFileExt(s string) string
- func Reverse[S ~[]E, E any](s S)
- func SortedMapKeys[V any](m map[string]V) []string
- func StripBadFileChars(s string) string
- func StripChars(s string, chars string) string
- func WaitForInternet(maxTries int) bool
- func YesOrNoPrompt(prompt string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlphaMapKeys ¶
func Contains ¶
func Contains[T comparable](xs []T, x T) bool
Contains returns true if slice contains value.
func GetLocalIp ¶
func InfoPrompt ¶
func InfoPrompt(prompt string)
InfoPrompt displays an information prompt for use with a controller.
func IsEmptyDir ¶
func MapKeys ¶
func MapKeys[K comparable, V any](m map[K]V) []K
MapKeys returns a list of all keys in a map.
func RandomElem ¶
RandomElem picks and returns a random element from a slice.
func RemoveEmptyDirs ¶
RemoveEmptyDirs removes all empty folders in a path, including folders containing only empty folders and the path itself.
func RemoveFileExt ¶
func SortedMapKeys ¶
SortedMapKeys return a sorted list of all keys in a map.
func StripBadFileChars ¶
StripBadFileChars removes all characters from a string that are not allowed in filenames.
func StripChars ¶
func WaitForInternet ¶
func YesOrNoPrompt ¶
YesOrNoPrompt displays a simple yes/no prompt for use with a controller.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.