getm

package module
v0.0.0-...-781f5f8 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 3 Imported by: 0

README

This is a hack tool for Go runtime

DON'T USE IT IN THE PRODUCTION ENVIRONMENT!

this will cause your programe unstable.

Example(如何使用)

请确保你的类型与结构体名是存在的,否则会panic

Please make sure the type of value is correct, or it will panic

Get a value in G struct.

CustomInG[uint64]("goid")

Set/Modify a value in G struct.

SetCustomInG[uint64]("goid", 123456)

Check wthether it's affected or not

fmt.Println(CustomInG[uint64]("goid"))

Get a value in M struct.

CustomInM[int64]("id")

Set/Modify a value in M struct.

SetCustomInM[int64]("id", 123456)

Check wthether it's affected or not

CustomInM[int64]("id")

Get a value in P struct.

CustomInM[int32]("id")

Set/Modify a value in P struct.

SetCustomInP[int32]("id", 1)

Check wthether it's affected or not

CustomInP[int32]("id")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomInG

func CustomInG[T any](fieldName string) T

use at your own risks.

func CustomInM

func CustomInM[T any](fieldName string) T

use at your own risks.

func CustomInP

func CustomInP[T any](fieldName string) T

use at your own risks.

func GetG

func GetG() uintptr

func GetM

func GetM() uintptr

func GetP

func GetP() uintptr

func MID

func MID() int64

func SetCustomInG

func SetCustomInG[T any](fieldName string, value T)

use at your own risks.

func SetCustomInM

func SetCustomInM[T any](fieldName string, value T)

use at your own risks.

func SetCustomInP

func SetCustomInP[T any](fieldName string, value T)

use at your own risks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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