utils

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_FORMAT = "2006-01-02 15:04:05"
)

Variables

View Source
var (
	ErrPathIsNotAPath = errors.New("Not a path")
	ErrPathPerm       = errors.New("User has not perm to path")
)
View Source
var (
	CHAR_POOL = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
)

Functions

func EnsurePath

func EnsurePath(path string) error

配置中的路径存在检查, 自动创建, 并执行权限检查

func ErrPanic

func ErrPanic(err error)

func Md5

func Md5(data []byte) string

func MemSet

func MemSet(p unsafe.Pointer, b byte, length uintptr)

func RandInt

func RandInt(max int) int

func RandIntScope

func RandIntScope(from, to int) int

func RandNumAlphaString

func RandNumAlphaString(length int) string

func RandNumString

func RandNumString(length int) string

func Sha1

func Sha1(data []byte) string

func Sha256

func Sha256(data []byte) string

func Unused

func Unused(v ...interface{})

func ValidPhoneCN

func ValidPhoneCN(phone 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