Documentation ¶
Overview ¶
archive-utils.go - Provides utility methods for handling archives
http-utils.go - Provides utility methods for HTTP handling
os-utils.go - Provide operating system IO related utility methods
I.E.) opening files, creating directories, remove files/directories, getting file info.
utils.go - Provide generic utility methods.
Index ¶
- func CreateDir(path string) error
- func CreateFile(fileName string) (*os.File, error)
- func ExtractGZIP(gzFileName string, destination string) (string, error)
- func GetFileContents(file string) (string, error)
- func GetFilesByExtension(root string, extensions []string) ([]string, error)
- func IsStrInStrArray(vals []string, strToCheck string) bool
- func NewHttpRequestNoBody(httpMethod string, url string, headers *map[string]string) (*http.Request, error)
- func OpenFile(filepath string) (*os.File, error)
- func PanicIfError(e error)
- func RemoveDir(dir string) error
- func RemoveDuplicate[T comparable](sliceList []T) []T
- func RemoveDuplicates(tokens []string) []string
- func RemoveFile(filePath string) error
- func StringsMatch(lhs string, rhs string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractGZIP ¶
Extracts the gzip file represented by the file name and extracts the content to the provided destination
func GetFileContents ¶
func GetFilesByExtension ¶
func IsStrInStrArray ¶
Does the provided string exist in the provided slice of strings
func NewHttpRequestNoBody ¶
func NewHttpRequestNoBody(httpMethod string, url string, headers *map[string]string) (*http.Request, error)
Create a new HTTP request that contains the provided headers, method and url. Request has no body
func PanicIfError ¶
func PanicIfError(e error)
func RemoveDuplicate ¶
func RemoveDuplicate[T comparable](sliceList []T) []T
func RemoveDuplicates ¶
Remove any duplicate tokens for a slice of tokens
func RemoveFile ¶
Types ¶
This section is empty.