utils

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUID

func CPUID() string

CPUID unique cpu id

func Exists

func Exists(path string) bool

Exists files

func FileMd5

func FileMd5(file string) string

FileMd5 calc file md5

func GetFuncName

func GetFuncName(f interface{}) string

GetFuncName return func name

func GetLocalIP

func GetLocalIP() (string, error)

GetLocalIP return local ip

func IsDir

func IsDir(path string) bool

IsDir check

func IsFile

func IsFile(path string) bool

IsFile check

func Md5

func Md5(str string) string

Md5 for string

func RandomIP

func RandomIP() string

RandomIP ip address

func RandomStr

func RandomStr(len int) string

RandomStr random str

func URLJoin

func URLJoin(base, href string) string

URLJoin join urls

func UUID

func UUID() string

UUID unique id

Types

type Map

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

func (*Map) Incr

func (m *Map) Incr(key string, amount int)

Jump to

Keyboard shortcuts

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