toolunsafe

package
v0.0.0-...-8371346 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToByte

func AnyToByte[T any](d *T) []byte

AnyToByte 任意类型 转 []byte d的指针地址与返回值[]byte的底层数值指针是同一个地址

func ByteToAny

func ByteToAny[T any](d []byte) *T

ByteToAny []byte 转 指定类型 *T与 d的底层数组指针是同一个地址,string,[]byte类型除外

func ReadPtr

func ReadPtr(pointer unsafe.Pointer, n int64) []byte

ReadPtr 传入一个内存地址向后读取n个字节

Types

This section is empty.

Jump to

Keyboard shortcuts

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