Skip to content

Latest commit

 

History

History
77 lines (58 loc) · 1.38 KB

File metadata and controls

77 lines (58 loc) · 1.38 KB

reflectx

Golang reflect package hack tools

Build Status

Go Version

  • Go 1.21 ~ 1.27

Compilers

Platforms

  • macOS
  • Linux
  • Windows
  • WebAssembly

Go ABI

Field

  • reflectx.CanSet
  • reflectx.Field
  • reflectx.FieldByIndex
  • reflectx.FieldByName
  • reflectx.FieldByNameFunc

Named

  • reflectx.StructOf(fs)

  • reflectx.NamedTypeOf

  • SetUnderlying

  • SetTypeName

Method

  • reflectx.Method

  • reflectx.MakeMethod

  • reflectx.NewMethodSet

  • reflectx.SetMethodSet

  • reflectx.StructToMethodSet

Interface

  • reflectx.InterfaceOf
  • reflectx.NamedInterfaceOf
  • reflectx.NewInterfaceType
  • reflectx.SetInterfaceType

Context

  • reflectx.NewContext()

Method allocs

  • allocs
import _ "github.com/goplus/reflectx/icall/icall[N]"
  • install icall_gen
go install github.com/goplus/reflectx/cmd/icall_gen@latest
icall_gen -o icall1024.go -pkg main -size 1024

build linkname mode

go build -tags linknamefix -ldflags="-checklinkname=0"