Documentation ¶
Index ¶
- func ArrayHave(items []string, item string) bool
- func CamelCaseToUdnderscore(s string) string
- func ExecShell(s string) (string, error)
- func FileExists(path string) bool
- func GetIp() string
- func GetType(params interface{}) string
- func InArray(needle interface{}, hystack interface{}) bool
- func Int2Time(ts int64) *time.Time
- func IntPtr(s int) *int
- func Ip2long(ipstr string) (ip uint32)
- func IsEmpty(params interface{}) bool
- func IsEmptyStr(params string) bool
- func Long2ip(ip uint32) string
- func MicrosecondsStr(latency time.Duration) int64
- func RemoteIp(req *http.Request) string
- func Str2Time(str string) *time.Time
- func StrToInt(str string) int
- func StrToInt64(str string) int64
- func StrToUInt(str string) uint
- func Strct2Slice(f interface{}, sheetFieldsJson []string) []interface{}
- func StringPtr(s string) *string
- func Stru2map(content interface{}) map[string]interface{}
- func Ternary(a bool, b, c interface{}) interface{}
- func TimeToStr(t *time.Time) string
- func ToLower(s string) string
- func ToUpper(s string) string
- func UderscoreToLowerCamelCase(s string) string
- func UderscoreToUpperCamelCase(s string) string
- func UrlQueryStrToMap(urlstr string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func GetType ¶
func GetType(params interface{}) string
GetType : 获取数据类型字符串 (string, int, float64, []int, []string, map[string]int ...) GetType : (能不用则不用,由于涉及到使用reflect包,性能堪忧)
func Strct2Slice ¶
func Strct2Slice(f interface{}, sheetFieldsJson []string) []interface{}
struct 转 切片
func UrlQueryStrToMap ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.