Registry / utility / lestrrat-go-blackmagic

lestrrat-go-blackmagic

JSON →
library1.0.4gogounverified

A Go library providing reflection and unsafe pointer utilities.

go get github.com/lestrrat-go/blackmagic
INSTALL
IMPORT
SIG · LESTRRAT-GO-BLACKM
L
lestrrat-go-blackmagic
utilitygov1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

blackmagic
github.com/lestrrat-go/blackmagic

Demonstrates getting a pointer from a value using blackmagic.

package main import ( "fmt" "github.com/lestrrat-go/blackmagic" ) func main() { var x int = 42 blackmagic.GetPointer(&x) fmt.Println(x) }
Debug
Known issues
gotchaUses unsafe operations; may break with Go version changes.
fix
Avoid unless absolutely necessary; prefer safe reflection.
affects: >=1.0.0
Upgrade
Version history
1.0.4latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
lestrrat-go-blackmagic — go get lestrrat-go-blackmagic · libregistry