github.com/gramework/runtimer@v0.0.0-20211014201118-d25b6e2ccefd/getDataPtr.go (about) 1 package runtimer 2 3 import "unsafe" // #nosec 4 5 func GetEfaceDataPtr(eface interface{}) unsafe.Pointer { 6 return ((*[2]unsafe.Pointer)(unsafe.Pointer(&eface))[1]) 7 } 8 9 func EfaceDataPtr(eface interface{}) *unsafe.Pointer { 10 return &((*[2]unsafe.Pointer)(unsafe.Pointer(&eface))[1]) 11 }