helper

package
v0.0.0-...-ec63d53 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Rander = rand.New(src)

Functions

func Base64

func Base64(input string) string

func DateTimeToTimestamp

func DateTimeToTimestamp(datetime string) int64

时间转时间戳

func DateToTimestamp

func DateToTimestamp(datetime string) int64

时间转时间戳

func Explode

func Explode(originStr string, symbol string) []string

explode 类似php的 explode函数,将字符串转为数组

func GenDateRandId

func GenDateRandId() string

生成以日期随机的id

func GetLocalIp

func GetLocalIp() string

获取服务器IP

func Implode

func Implode(originArr []string, symbol string) string

implode 类似php的 implode函数,将数组转为字符串

func IpInt2String

func IpInt2String(ipInt int) string

整型转换成字符串

func IpString2Int

func IpString2Int(ipstring string) int64

字符串转换整型

func IsEmail

func IsEmail(email string) bool

是否是email

func Md5

func Md5(str string) string

func NowDatetime

func NowDatetime() string

当前时间

func NowTimestamp

func NowTimestamp() int64

当前时间戳

func RandInt

func RandInt(min int, max int) int

随机数生成 @Param min int 最小值 @Param max int 最大值 @return int

func RandNumString

func RandNumString(n int) string

func RandString

func RandString(n int) string

func Sha256

func Sha256(s string) string

func TimestampToDate

func TimestampToDate(timestamp int64) string

时间戳 to 时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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