Documentation ¶
Overview ¶
Package utils contains a set of utility functions
Index ¶
- func CleanFilePath(filePath string) string
- func CopyFile(src, dst string) (err error)
- func FilePaths(ext string, dirPaths ...string) ([]string, error)
- func MkdirAll(path string) error
- func SliceList(slice []string) string
- func ToSimpleQuery(queryMap map[string]string) string
- func WriteFile(path string, bytes []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanFilePath ¶
CleanFilePath cleans the file path for `.` and ensures that there are no `/` at the start and end of the string
func CopyFile ¶
CopyFile copies a file, from: https://stackoverflow.com/a/21067803/1090482
func SliceList ¶
SliceList converts a []string to a nicely formatted string ex. "Steve, Kate & Johnny"
func ToSimpleQuery ¶
ToSimpleQuery converts a map[string]string to a HTTP query string. Doesn't work for query strings with multiple levels,
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.