Documentation ¶
Index ¶
- func AppendChecksum(dst string, src string) error
- func ArrayToMap[T any](m map[string]T, e []T, f func(T) string) map[string]T
- func CalcChecksum(src string) (string, error)
- func Contains(a string, b string) bool
- func CopyDir(src, dst string) error
- func CopyFile(src, dst string) error
- func CreateTarGz(src, dst string) error
- func CreateZipFromDir(src, dst string) error
- func Ext(file string) string
- func ExtractTarGz(src, dest string) error
- func ExtractZipFile(zipFile string, dest string) error
- func FileExists(src string) bool
- func FilterDir(src string, filter func(fs.DirEntry) bool) ([]fs.DirEntry, error)
- func FindFile(src string, name string) (fs.FileInfo, error)
- func GetFreePort() (int, error)
- func HasExt(src string, ext string) bool
- func HttpDownload(url, dest string) error
- func IsDir(src string) bool
- func IsDocument(path string) bool
- func IsFile(src string) bool
- func Join(elem ...string) string
- func ListDir(src string) ([]fs.DirEntry, error)
- func MakeIdGenerator(prefix string) func() string
- func MapToArray[T any](m map[string]T) []T
- func MkDir(src string) error
- func Must(err error)
- func ReadDocument(src string, v any) error
- func ReadFile(src string) ([]byte, error)
- func Rename(src, dst string) error
- func RmDir(src string) error
- func RmFile(src string) error
- func WriteDocument(dst string, v any) error
- func WriteFile(dst string, data []byte) error
- func YamlToJson(in []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendChecksum ¶
func ArrayToMap ¶
ArrayToMap converts an array to a map using a key function
func CalcChecksum ¶
func CreateTarGz ¶
CreateTarGz creates a tar.gz file from a source directory.
func CreateZipFromDir ¶
CreateZipFile creates a zip file from a src directory.
func ExtractTarGz ¶
ExtractTarGz extracts a tar.gz file to a destination directory.
func ExtractZipFile ¶
ExtractZipFile extracts a zip file to a destination directory.
func FileExists ¶
func GetFreePort ¶
func HttpDownload ¶
HttpDownload downloads a file from a url to a local file.
func IsDocument ¶
func Join ¶
Join joins any number of path elements into a single path. If any element is an absolute path, Join returns the absolute path of that element and ignores previous elements.
func MakeIdGenerator ¶
MakeIdGenerator creates a new id generator The id generator is a function that returns a new id on each call
func ReadDocument ¶
func WriteDocument ¶
func YamlToJson ¶
Types ¶
This section is empty.