PublicFun

package module
v0.0.0-...-d9d9e14 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 4 Imported by: 0

README

PublicFun

一些可以被golang项目公用的函数

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandAsciiString

func CreateRandAsciiString(scope []byte, length int) string

***************************************************************** 几个关键的ascii值 48='0', 57='9', 65='A', 90='Z', 97='a', 122='z' 函数作用:创建随机的ascii字符串(需要自己预设随机种子) 参数说明:scope 创建字符串选择的字符范围

length	创建的字符串的长度

例子:见PublicFun_test.go *****************************************************************

func DumpHex

func DumpHex(ptr unsafe.Pointer, length uintptr)

***************************************************************** 函数作用:打印内存块的值 参数说明:ptr 内存起始地址

lenghth	内存块大小

例子:见PublicFun_test.go(待补充) *****************************************************************

func GetMidnightTimer

func GetMidnightTimer(days int) (int64, error)

***************************************************************** 函数作用:返回东八区(即北京时间)明天的0点0分0秒时的UNIX时间戳 参数说明:days:表示多少天,例如-3表示3天前的午夜 9表示9天后的午夜

例子:见PublicFun_test.go *****************************************************************

Types

This section is empty.

Jump to

Keyboard shortcuts

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