On Sun, Mar 29, 2015 at 9:38 PM, Victor L <
vlya...@gmail.com> wrote:
>
> Thanks for the response, only used "connect" as an example. I am looking for
> "Go" syntax for checking of the specific error, like "if ( connect() ==
> EISCONN)" ...
It's a simple question that doesn't have a simple answer. The Go net
package is designed be OS-independent, so it doesn't directly expose
errno values that are system dependent. It also tries to give more
informative errors, which again tends to hide the errno value.
In general the error returned by a function like Dial will be an
instance of *net.OpError (
http://golang.org/pkg/net/#OpError). You
can dig into that to get the real errno value.
For example:
http://play.golang.org/p/EiPiNKMC0R
Ian