Documentation ¶
Index ¶
- func ArrayChunk(s []interface{}, size int) [][]interface{}
- func ArrayColumn(structSlice []interface{}, key string) []interface{}
- func ArrayUnique(arr []string) (newArr []string)
- func ConvertToString(src string, srcCode string, tagCode string) string
- func Date(format string) string
- func DateTime(format string, timestamp int64) string
- func ExecCommand(c string) (string, error)
- func Explode(delimiter, str string) []string
- func FileExists(filename string) bool
- func Gexcel(data [][]string, file string, sheet string) error
- func HttpGetRequest(requestUrl string, requestHeaders ...map[string]string) ([]byte, error)
- func HttpPostRequest(requestUrl string, postData map[string]string, ...) ([]byte, error)
- func HttpProxyRequest(method, requestUrl string, proxy string, timeout int, ...) ([]byte, error)
- func Implode(glue string, pieces []string) string
- func In_Array(val interface{}, array interface{}) (exists bool, index int)
- func IsDir(filename string) (bool, error)
- func IsDirCreate(path string)
- func IsEmpty(val interface{}) bool
- func IsNumeric(val interface{}) bool
- func Lcfirst(str string) string
- func Ltrim(str string, characterMask ...string) string
- func MbStrlen(str string) int
- func Qexcel(filePath, sheet string) ([][]string, error)
- func Rand(min, max int) int
- func ReadFile(filePath string) ([]byte, error)
- func Rtrim(str string, characterMask ...string) string
- func Scanf(a *string)
- func Sleep(t int64)
- func StrReplace(search, replace, subject string, count int) string
- func Stripos(haystack, needle string, offset int) int
- func Strlen(str string) int
- func Strpos(haystack, needle string, offset int) int
- func Strripos(haystack, needle string, offset int) int
- func Strrpos(haystack, needle string, offset int) int
- func Strstr(haystack string, needle string) string
- func StrtoTime(format, strtime string) (int64, error)
- func Strtolower(str string) string
- func Strtoupper(str string) string
- func Substr(str string, start int, length int) string
- func Time() int64
- func Tracefile(content, filename string, mode string, bom ...string) (int, error)
- func Trim(str string, characterMask ...string) string
- func UA() string
- func Ucfirst(str string) string
- func Ucwords(str string) string
- func XmlDecode(data string) map[string]string
- type Cli
- type ConfigIni
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayColumn ¶
func ArrayColumn(structSlice []interface{}, key string) []interface{}
返回输入数组中某个单一列的值
func ConvertToString ¶
编码转换 ConvertToString(str, "gbk", "utf-8")
func HttpGetRequest ¶
GET请求
func HttpPostRequest ¶
func HttpPostRequest(requestUrl string, postData map[string]string, requestHeaders ...map[string]string) ([]byte, error)
POST请求
func HttpProxyRequest ¶
func HttpProxyRequest(method, requestUrl string, proxy string, timeout int, postData map[string]string, requestHeaders map[string]string) ([]byte, error)
HTTP代理请求
func StrReplace ¶
以其他字符替换字符串中的一些字符(区分大小写) StrReplace("go", "1", "You love go, I love go too!", -1)
Types ¶
type ConfigIni ¶
type ConfigIni struct {
// contains filtered or unexported fields
}
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.