I absolutely agree. However I don't see much of a point in waiting for the C calls to determine whether the message (or even the key somehow) is of size 0, and you have to check either way to prevent runtime errors. It's likely best to deal with cases like these outside of the C code, and a message size of 0 is a case which can be easily dealt with in Go (return a non-fatal error).