Documentation ¶
Index ¶
- Constants
- func BoolToString(val bool) string
- func CwdDir() string
- func ExpandUser(path string) string
- func GetBase64Image(body []byte, width, height int) string
- func GetExecDir() (string, error)
- func GetExecPath() (string, error)
- func GetMd5(str string) string
- func GetUTF8HtmlTitle(str string) string
- func HttpOpen(url string, n time.Duration, agent string) (res *http.Response, body []byte, err error)
- func IsDir(filePath string) bool
- func IsFile(filePath string) bool
- func IsValidStatus(status string) bool
- func ListDelete(list []string, key string) []string
- func MapDelete(d interface{}, key string)
- func SortMapKeys(dict interface{}) []string
- func SplitJID(jid string) (string, string)
- func StringToBool(val string) bool
Constants ¶
View Source
const ( UserAgentCurl = "curl/7.45.0" UserAgentFirefox = "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" UserAgentChrome = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36" )
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶
func ExpandUser ¶
ExpandUser is a helper function that expands the first '~' it finds in the passed path with the home directory of the current user.
Note: This only works on environments similar to bash.
func GetBase64Image ¶
func GetExecDir ¶
WorkDir returns absolute path of work directory.
func GetExecPath ¶
func GetUTF8HtmlTitle ¶
func IsDir ¶
isDir returns true if given path is a directory, or returns false when it does not exist.
func IsFile ¶
isFile returns true if given path is a file, or returns false when it's a directory or does not exist.
func IsValidStatus ¶
func ListDelete ¶
func SortMapKeys ¶
func SortMapKeys(dict interface{}) []string
func StringToBool ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.