Thanks to the fix committed today, errno now seems to function with
values outside the range of those used by the standard libraries (I've
only tested it with my simple use test). However, retrieving the value
is still difficult. The solution I've used thus far is to split the
error string, then convert the errno value to integer, then test the
integer against the C errno values from the library.
To me it would be far simpler to simply add another function, Value(),
to retrieve the errno value similar to how the original implementation
did it:
_, errno := C.somecfun()
if errno.Value() != int(C.SOMEERR) {
// Print error string
}
If the error does NOT contain an Errno value then 0 would be
returned.
I wasn't sure if this was something I should file a bug report on,
however, in case there WAS a simple way to get the value from error
that I've somehow overlooked.
Rob