update go-structr to v0.8.11 (#3380)

This commit is contained in:
kim
2024-10-02 10:58:20 +00:00
committed by GitHub
parent e3019eada4
commit c17abea921
11 changed files with 306 additions and 91 deletions

View File

@ -1,7 +1,5 @@
package structr
import "unsafe"
// once only executes 'fn' once.
func once(fn func()) func() {
var once int32
@ -13,9 +11,3 @@ func once(fn func()) func() {
fn()
}
}
// eface_data returns the data ptr from an empty interface.
func eface_data(a any) unsafe.Pointer {
type eface struct{ _, data unsafe.Pointer }
return (*eface)(unsafe.Pointer(&a)).data
}