I'm experimenting with using cgo at the moment and am having trouble
getting the actual errno code. I know it's possible to get the errno
wrapped up nicely as a Go error like this:
ret, err := C.SomeFunc()
This doesn't provide me with the actual errno code though, only the
string representation. How do I get the actual code?
I found this thread
http://groups.google.com/group/golang-nuts/browse_thread/thread/85e98c1f6fe279b2/a8e754cf06e7ad1d?lnk=gst&q=cgo+errno#a8e754cf06e7ad1d
The solution no longer seems to work (at least for me).
main.go:17[/tmp/go-build631361673/command-line-arguments/_obj/
main.cgo1.go:19]: undefined: syscall.Error
I've also seen some mention of an os.Errno variable in Go, but also
have the same problem with that:
main.go:17[/tmp/go-build176917443/command-line-arguments/_obj/
main.cgo1.go:19]: undefined: os.Errno
I'm using Go installed direct from the repositories and building using
the 'go build' tool. The 'go version' command doesn't seem to provide
much in the way of detailed version information ('go version go1') for
me to provide, what information should I provide in the future when
asking for support?
Troy