std

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPower2 uint64 = 1 << (64 - 1)
)

Variables

This section is empty.

Functions

func FromHexString

func FromHexString(s string) ([]byte, error)

FromHexString 16进制字符串转字节数组

func GoID added in v0.0.17

func GoID() int64

GoID 获取协程id

func HighestOneBit added in v0.0.17

func HighestOneBit(x uint64) uint64

HighestOneBit 返回大于等于 x 的最小 2 的幂次方. 特殊情况:

x = 0 → 返回 1<<63(可根据需求调整)
x 是 2 的幂 → 直接返回 x

func ToHexString

func ToHexString(data []byte) string

ToHexString 字节数组转16进制字符串

Types

This section is empty.

Directories

Path Synopsis
mmap_common.go
mmap_common.go

Jump to

Keyboard shortcuts

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