util

package
v0.0.0-...-9a57a4e Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr_LollipopGO

func CheckErr_LollipopGO(err error)

func GetNowUnixNano_LollipopGo

func GetNowUnixNano_LollipopGo() int64

单位纳秒,打印结果:1491888244752784461

func GetNowUnix_LollipopGo

func GetNowUnix_LollipopGo() int64

单位s ,打印结果:1491888244

func GetNowtimeMD5_LollipopGO

func GetNowtimeMD5_LollipopGO() string

func GetTime_LollipopGO

func GetTime_LollipopGO() string

func Int2str_LollipopGo

func Int2str_LollipopGo(data int) string

func MD5_LollipopGO

func MD5_LollipopGO(data string) string

MD5 实现 :主要是针对 字符串的加密

func RandGroup_LollipopGo

func RandGroup_LollipopGo(p ...uint32) int

func RandIntervalN_LollipopGo

func RandIntervalN_LollipopGo(b1, b2 int32, n uint32) []int32

func RandInterval_LollipopGo

func RandInterval_LollipopGo(b1, b2 int32) int32

func Randnum_LollipopGO

func Randnum_LollipopGO(max int) int

------------------------------------------------------------------------------ 返回[0,max)的随机整数

func Sort_LollipopGo

func Sort_LollipopGo(data map[string]*conf.DSQ_Exp, iExp int) int

------------------------------------------------------------------------------ 例子已经写在简书:https://www.jianshu.com/p/e30a9db07da0 详见《彬哥Go语言笔记》

func Str2int_LollipopGo

func Str2int_LollipopGo(data string) int

func UTCTime_LollipopGO

func UTCTime_LollipopGO() string

生成时间戳的函数

Types

type Map

type Map struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Map) AddCount

func (m *Map) AddCount(key interface{}, value interface{})

累加数据

func (*Map) Del

func (m *Map) Del(key interface{})

func (*Map) Get

func (m *Map) Get(key interface{}) interface{}

func (*Map) Len

func (m *Map) Len() int

func (*Map) LockRange

func (m *Map) LockRange(f func(interface{}, interface{}))

func (*Map) LollipopGo_RLockRange

func (m *Map) LollipopGo_RLockRange(data map[string]interface{}) map[string]interface{}

并发安全读取

func (*Map) RLockRange

func (m *Map) RLockRange(f func(interface{}, interface{}))

枚举数据

func (*Map) Set

func (m *Map) Set(key interface{}, value interface{})

func (*Map) TestAndSet

func (m *Map) TestAndSet(key interface{}, value interface{}) interface{}

func (*Map) UnsafeDel

func (m *Map) UnsafeDel(key interface{})

func (*Map) UnsafeGet

func (m *Map) UnsafeGet(key interface{}) interface{}

func (*Map) UnsafeLen

func (m *Map) UnsafeLen() int

func (*Map) UnsafeRange

func (m *Map) UnsafeRange(f func(interface{}, interface{}))

func (*Map) UnsafeSet

func (m *Map) UnsafeSet(key interface{}, value interface{})

Jump to

Keyboard shortcuts

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