util

package
v1.9.18 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ip2long

func Ip2long(ip string) uint64

func Long2ip

func Long2ip(ip uint64) net.IP

func MD5Hash

func MD5Hash(b []byte) string

MD5Hash MD5哈希值

func MD5HashString

func MD5HashString(data string) string

func SHA1Hash

func SHA1Hash(b []byte) string

SHA1Hash SHA1哈希值

func SHA1HashString

func SHA1HashString(s string) string

SHA1HashString SHA1哈希值

func WeekStartDay

func WeekStartDay() time.Time

WeekStartDay 获取本周第一天(周一)

Types

type I

type I interface {
	Bytes() []byte
	String() string
	Int64() int64
	Int() int
	Uint() uint
	Float64() float64
	Uint64() uint64
	Bool() bool
}

I interface{}类型转换

func Reflect

func Reflect(v interface{}) I

type Str

type Str string

Str 字符串类型转换

func (Str) Bytes

func (s Str) Bytes() []byte

Bytes 转换为[]byte

func (Str) Float64

func (s Str) Float64() float64

Float64 转换为float64

func (Str) Int

func (s Str) Int() int

Int 转换为int

func (Str) Int64

func (s Str) Int64() int64

Int64 转换为int64

func (Str) String

func (s Str) String() string

func (Str) ToJSON

func (s Str) ToJSON(v interface{}) error

ToJSON 转换为JSON

func (Str) Uint

func (s Str) Uint() uint

Uint 转换为uint

func (Str) Uint64

func (s Str) Uint64() uint64

Uint64 转换为uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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