Documentation ¶
Index ¶
- Constants
- func Bool(val interface{}) (bool, bool)
- func Float64(val interface{}) (float64, bool)
- func GbkToUtf8(s []byte) ([]byte, error)
- func Int(val interface{}) (int, bool)
- func Int64(val interface{}) (int64, bool)
- func IsNil(val interface{}) bool
- func JsonToArray(ext string) ([]string, error)
- func JsonToString(ext string) (string, error)
- func String(val interface{}) string
- func StringToArray(ext string) (array []string, err error)
- func StringToMap(ext string) (map[string]string, error)
- func StructToMap(in interface{}, tagName string) (map[string]interface{}, error)
- func Time(val interface{}) (time.Time, bool)
- func TimePtr(val interface{}) *time.Time
- func Uint(val interface{}) (uint, bool)
- func Uint64(val interface{}) (uint64, bool)
- func Utf8ToGbk(s []byte) ([]byte, error)
Constants ¶
View Source
const ( TIME_DATE string = "2006-01-02" TIME_NORMAL string = "2006-01-02 15:04:05" TIME_SHORTDATE string = "20060102" )
Variables ¶
This section is empty.
Functions ¶
func JsonToArray ¶
JsonToArray 将shell命令的json字符转换成Array "{\"-a\":\"123\",\"-b\":\"hello\"}" ---> ["-a","123","-b","hello"]
func JsonToString ¶
JsonToString 将shell命令的json字符转换成string "{\"-a\":\"123\",\"-b\":\"hello\"}" ---> "-a 123 -b hello"
func StringToArray ¶
StringToArray 将shell命令转换成Array "-a 123 -b hello" ---> ["-a","123","-b","hello"]
func StringToMap ¶
StringToMap 将shell命令转换成Map "-a 123 -b hello" ---> {"-a":"123","-b":"hello"}
func StructToMap ¶
StructToMap 结构体转为Map[string]interface{} chairou添加
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.