Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvDefault ¶
EnvDefault returns the value of the given environment variable key if it is not empty. If it is empty it returns the fallback as an absolute path joined with the users home.
func Escape ¶
Escape escapes the given data to make sure it is safe to use it as a filename. It also replaces spaces and other seperation characters with the '-' character. It returns an error if the escaped string is empty.
func Get ¶
Get performs a HTTP GET request, just like http.get, however, it has a few handy extra features: I adds a User-Agent header and it retries a failed get request if the error was a temporary one.
func GetFile ¶
GetFile downloads the file from the given uri and stores it in the specified target directory. If a download was interrupted previously GetFile is able to resume it.
Types ¶
This section is empty.