1
0
Fork 0
forked from External/grumble
grumble/cmd/grumble/util.go
2024-07-24 17:01:20 -07:00

8 lines
171 B
Go

package main
import "unsafe"
// Stolen from https://dev.to/chigbeef_77/bool-int-but-stupid-in-go-3jb3
func b2i(b bool) int {
return int(*(*byte)(unsafe.Pointer(&b)))
}