funcs

package
v0.0.0-...-50f8553 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayJoin

func ArrayJoin(array_or_slice interface{})

func CaptchaCreate

func CaptchaCreate(idKey string, captchaLen int) (string, string)

func FormatTime

func FormatTime(timestamp int64) string

func FormatTimeDate

func FormatTimeDate(timestamp int64) string

func GetRandomString

func GetRandomString(count int) string

生成随机字符串

func JsonCode

func JsonCode(data interface{}) (string, error)

编码

func JsonDeCode

func JsonDeCode(code []byte) (*simplejson.Json, error)

解码复杂的结构

func JsonDeCodeInt

func JsonDeCodeInt(code []byte) int

解码字符串

func JsonDeCodeString

func JsonDeCodeString(code []byte) string

解码字符串

func JsonGetToInt

func JsonGetToInt(json *simplejson.Json, key string) int

simplejson.Get(key).String() to int

func JsonGetToString

func JsonGetToString(json *simplejson.Json, key string) string

simplejson.Get(key).String()

func JsonNumberToInt

func JsonNumberToInt(v interface{}) int

json.Number转int

func JsonNumberToInt64

func JsonNumberToInt64(v interface{}) int64

json.Number转int

func MD5

func MD5(text string) string

生成32位MD5

func Now

func Now() string

func ProcessErrorBeego

func ProcessErrorBeego(this *beego.Controller, err error) bool

func RunShell

func RunShell(name string) string

运行脚本

func SaltStr

func SaltStr(str string, salt string) string

Salt字符串

func StringToFloat32

func StringToFloat32(_str interface{}) float32

字符串转float32

func StringToFloat64

func StringToFloat64(_str interface{}) float64

字符串转float64

func StringToInt

func StringToInt(_str interface{}) int

字符串转数字

func StringToInt64

func StringToInt64(_str interface{}) int64

字符串转数字

func TimestampRandStr

func TimestampRandStr(rndCount int) string

时间戳加随机数量的长度的字符串

func ToString

func ToString(a interface{}) string

数字转字符串

func Typeof

func Typeof(v interface{}) string

打印出类型字符串

func VerfiyCaptcha

func VerfiyCaptcha(idkey, verifyValue string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL