func BoolToInt(x bool) int32 {
	if x {
		return 1
	}
	return 0
}
BoolToInt converts boolean value to an int, which is a common operation in C.
0 and 1 represent false and true respectively.
package noarch
import "fmt"