Documentation ¶
Index ¶
- func Convert(str string, srcCode string, targetCode string) (string, error)
- func ConvertToByte(src string, srcCode string, targetCode string) ([]byte, error)
- 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 GetToStringWithHeader(url string, setting HttpSetting) (string, http.Header, error)
- func HashHmac(data []byte, key []byte, binary bool) string
- func Implode(glue string, pieces []string) string
- func InArray(array interface{}, item interface{}) bool
- 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 MtRand(min, max int64) int64
- 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 StrPos(str, substr string) int
- 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 DownloadFile ¶
func DownloadFile(url string, path string, setting HttpSetting) error
DownloadFile 下载文件
func DownloadImage ¶ added in v0.0.3
func DownloadImage(url string, path string, setting HttpSetting) error
DownloadImage 图片下载
func GetExtensionName ¶ added in v0.0.11
获取文件名拓展名
func GetToBody ¶ added in v0.1.1
func GetToBody(url string, setting HttpSetting) (io.ReadCloser, error)
GetToBody 注意要手动关闭body
func GetToResp ¶ added in v0.1.1
func GetToResp(url string, setting HttpSetting) (*http.Response, error)
GetToResp 注意要手动关闭body
func GetToString ¶ added in v0.1.0
func GetToString(url string, setting HttpSetting) (string, error)
GetToString get获取字符串结果
func GetToStringWithHeader ¶ added in v0.2.14
GetToStringWithHeader get获取字符串结果并返回头部信息
func PostToString ¶ added in v0.1.0
func PostToString(url string, setting HttpSetting) (string, error)
PostToString post获取字符串结果
func SendEmail ¶ added in v0.0.5
func SendEmail(from string, to []string, title string, content string, host string, port int, password string) error
发送邮件
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.