Documentation
¶
Index ¶
- func ConvertToByte(src string, srcCode string, targetCode string) []byte
- func Date(format string, timestamp int64) string
- func DeleteFile(path string) error
- func DownloadFile(url string, path string, setting HttpSetting) error
- func DownloadImage(url string, path string, setting HttpSetting) error
- func Explode(delimiter, text string) []string
- func GetExtensionName(fileName string) (string, error)
- func GetToBody(url string, setting HttpSetting) (io.ReadCloser, error)
- func GetToResp(url string, setting HttpSetting) (*http.Response, error)
- func GetToString(url string, setting HttpSetting) (string, error)
- func Implode(glue string, pieces []string) string
- func In_array(array interface{}, item interface{}) bool
- func IsGBK(data []byte) bool
- func Join(glue string, pieces []string) string
- func Md5(str string) string
- func MkDirDepth(path string) error
- func Mt_rand(min, max int64) int64
- func PostToString(url string, setting HttpSetting) (string, error)
- func Query(url string, method string, setting HttpSetting) (*http.Response, error)
- func ReadFile(path string) (string, error)
- func SendEmail(from string, to []string, title string, content string, host string, port int, ...) error
- func StrToTime(str string) int64
- func SubStr(str string, start int, length int) string
- func WriteLine(path string, data string)
- type HttpSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToByte ¶ added in v0.1.2
func DownloadImage ¶ added in v0.0.3
func DownloadImage(url string, path string, setting HttpSetting) error
图片下载
func GetExtensionName ¶ added in v0.0.11
获取文件名拓展名
func GetToBody ¶ added in v0.1.1
func GetToBody(url string, setting HttpSetting) (io.ReadCloser, error)
注意要手动关闭body
func GetToResp ¶ added in v0.1.1
func GetToResp(url string, setting HttpSetting) (*http.Response, error)
注意要手动关闭body
func GetToString ¶ added in v0.1.0
func GetToString(url string, setting HttpSetting) (string, error)
get获取字符串结果
func PostToString ¶ added in v0.1.0
func PostToString(url string, setting HttpSetting) (string, error)
post获取字符串结果
Types ¶
Click to show internal directories.
Click to hide internal directories.