You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go's GetBool() function checks whether a byte is == 1
// GetBool decodes a little-endian bool from a byte slice.funcGetBool(buf []byte) bool {
returnbuf[0] ==1
}
This is inconsistent with rust, C++, PHP, Python and is not what I think of as the usual convention of integer-to-boolean conversion.
Alternatively: it could be made explicit that the only legal values for bytes storing booleans are 0 and 1; currently the internals doc is not explicit and no verifiers I have looked at will reject a boolean of (say) 2.