Versions in this module Expand all Collapse all v0 v0.1.0 Sep 25, 2015 Changes in this version + const Blue + const Byte + const EByte + const EndColor + const GByte + const Gray + const Green + const KByte + const MByte + const Magenta + const PByte + const Red + const TByte + const Yellow + var UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1541.0 Safari/537.36" + func AESDecrypt(key, text []byte) ([]byte, error) + func AESEncrypt(key, text []byte) ([]byte, error) + func AppendStr(strs []string, str string) []string + func Base64Decode(str string) (string, error) + func Base64Encode(str string) string + func ColorLog(format string, a ...interface{}) + func ColorLogS(format string, a ...interface{}) string + func CompareSliceStr(s1, s2 []string) bool + func CompareSliceStrU(s1, s2 []string) bool + func Copy(src, dest string) error + func CopyDir(srcPath, destPath string, filters ...func(filePath string) bool) error + func Date(ti int64, format string) string + func DateParse(dateString, format string) (time.Time, error) + func DateS(ts string, format string) string + func DateT(t time.Time, format string) string + func ExecCmd(cmdName string, args ...string) (string, string, error) + func ExecCmdBytes(cmdName string, args ...string) ([]byte, []byte, error) + func ExecCmdDir(dir, cmdName string, args ...string) (string, string, error) + func ExecCmdDirBytes(dir, cmdName string, args ...string) ([]byte, []byte, error) + func Expand(template string, match map[string]string, subs ...string) string + func FetchFiles(client *http.Client, files []RawFile, header http.Header) error + func FetchFilesCurl(files []RawFile, curlOptions ...string) error + func FileMTime(file string) (int64, error) + func FileSize(file string) (int64, error) + func GetAllSubDirs(rootPath string) ([]string, error) + func GetFileListBySuffix(dirPath, suffix string) ([]string, error) + func GetGOPATHs() []string + func GetSrcPath(importPath string) (appPath string, err error) + func HexStr2int(hexStr string) (int, error) + func HomeDir() (home string, err error) + func Html2JS(data []byte) []byte + func HtmlDecode(str string) string + func HtmlEncode(str string) string + func HttpCall(client *http.Client, method, url string, header http.Header, body io.Reader) (io.ReadCloser, error) + func HttpGet(client *http.Client, url string, header http.Header) (io.ReadCloser, error) + func HttpGetBytes(client *http.Client, url string, header http.Header) ([]byte, error) + func HttpGetJSON(client *http.Client, url string, v interface{}) error + func HttpGetToFile(client *http.Client, url string, header http.Header, fileName string) error + func HttpPost(client *http.Client, url string, header http.Header, body []byte) (io.ReadCloser, error) + func HttpPostJSON(client *http.Client, url string, body, v interface{}) error + func HumaneFileSize(s uint64) string + func Int2HexStr(num int) (hex string) + func IsDir(dir string) bool + func IsEmail(email string) bool + func IsEmailRFC(email string) bool + func IsExist(path string) bool + func IsFile(filePath string) bool + func IsLetter(l uint8) bool + func IsSliceContainsInt64(sl []int64, i int64) bool + func IsSliceContainsStr(sl []string, str string) bool + func IsUrl(url string) bool + func Nl2br(str string) string + func PowInt(x int, y int) int + func RandomCreateBytes(n int, alphabets ...byte) []byte + func Reverse(s string) string + func StatDir(rootPath string, includeDir ...bool) ([]string, error) + func StripTags(src string) string + func ToSnakeCase(str string) string + func ToStr(value interface{}, args ...int) (s string) + func UrlDecode(str string) (string, error) + func UrlEncode(str string) string + func WriteFile(filename string, data []byte) error + type NotFoundError struct + Message string + func (e NotFoundError) Error() string + type RawFile interface + Data func() []byte + Name func() string + RawUrl func() string + SetData func([]byte) + type RemoteError struct + Err error + Host string + func (e *RemoteError) Error() string + type StrTo string + func (f StrTo) Exist() bool + func (f StrTo) Int() (int, error) + func (f StrTo) Int64() (int64, error) + func (f StrTo) MustInt() int + func (f StrTo) MustInt64() int64 + func (f StrTo) MustUint8() uint8 + func (f StrTo) String() string + func (f StrTo) Uint8() (uint8, error)