Documentation ¶
Overview ¶
package
Index ¶
- func BytesToString(b []byte) string
- func DateTime(layout string) string
- func FormatArrayInterface(data interface{}) ([]interface{}, error)
- func FormatArrayMap(data interface{}) ([]map[string]interface{}, error)
- func FormatArrayString(data interface{}) ([]string, error)
- func FormatFloat(data interface{}) (float64, error)
- func FormatInt(data interface{}) (int, error)
- func FormatInt64(data interface{}) (int64, error)
- func FormatMapString(data interface{}) (map[string]interface{}, error)
- func FormatMapStringString(data interface{}) (map[string]string, error)
- func FormatString(data interface{}) (string, error)
- func FormatStringToTime(layout, value string) (time.Time, error)
- func HmacHash(h func() hash.Hash, key, data string) string
- func MakeIntSlice(row, column int) [][]int
- func Md5(str string) string
- func Md5File(path string) (string, error)
- func Rand(min, max int) int
- func Sha1(str string) string
- func Sha1File(path string) (string, error)
- func Sha256(str string) string
- func StringToBytes(s string) []byte
- func TimeUnix() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatArrayInterface ¶
func FormatArrayInterface(data interface{}) ([]interface{}, error)
FormatArrayInterface 转成字符串数组
func FormatArrayMap ¶
FormatArrayMap 转换为map的数组
func FormatArrayString ¶
FormatArrayString 转成字符串数组
func FormatFloat ¶
FormatFloat interface{} 转换为浮点
func FormatMapString ¶
FormatMapString 转换为map,key为字符串类型
func FormatMapStringString ¶
FormatMapStringString 转换为map类型其中key,value都是字符类型的
func FormatString ¶
FormatString interface{} 转换为字符串
func FormatStringToTime ¶
FormatStringToTime 字符串转换成Time
func StringToBytes ¶
StringToBytes string不被编辑的场景可以使用 谨慎 提升性能同时存在安全隐患
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.