tag

package
v0.0.0-...-3aae54d Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetElem

func GetElem[E any, T any](p *T, offset uintptr) (pOut E)

func GetElemPointer

func GetElemPointer[E any, T any](p *T, offset uintptr) (pOut *E)

func NewTagInfos

func NewTagInfos(in interface{}, tag string) (tis map[string]*TagInfo, err error)

Types

type TagInfo

type TagInfo struct {
	// 常用的放前面,在缓存的概率大
	TagName string //

	BaseType reflect.Type //
	BaseKind reflect.Kind // 次成员可能是 **string,[]int 等这种复杂类型,这个 用来指示 "最里层" 的类型
	Offset   uintptr      //偏移量
}

TagInfo 拥有tag的struct的成员的解析结果

Jump to

Keyboard shortcuts

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