Documentation ¶
Index ¶
- func CheckHTTPResponse(resp *http.Response, err error) error
- func FileExists(filename string) bool
- func GetHTMLPage(client *http.Client, url string) (*goquery.Document, error)
- func HideFile(path string) (string, error)
- func IsHiddenFile(path string) (bool, error)
- func IsHiddenFilePath(path string) bool
- func Unzip(src string, dest string) ([]string, error)
- func WriteToHiddenFile(path string, data []byte, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHTTPResponse ¶ added in v0.1.2
CheckHTTPResponse checks the http.Response pointer and error returned by the http.RoundTripper. Returns nil if there is no error and the status code of the response is 2xx.
func FileExists ¶
FileExists checks whether the given file path exists or not.
func GetHTMLPage ¶ added in v0.1.2
GetHTMLPage gets the HTML page of the given url and parses the document or returns and an error if the HTTP call or the parsing failed.
func HideFile ¶
HideFile hides the file at the given path. Might return another path with a leading . in the filename.
func IsHiddenFile ¶
IsHiddenFile returns whether the given file path is a hidden file or not.
func IsHiddenFilePath ¶
IsHiddenFilePath returns whether the given path could be a hidden file in the os.
func Unzip ¶
Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2). from https://golangcode.com/unzip-files-in-go/
Types ¶
This section is empty.