On Tue, Sep 29, 2020 at 5:37 PM Kevin Chadwick <m8il1i...@gmail.com> wrote:
> Is ENETUNREACH - "network is unreachable" typed anywhere? I assume string > matching on these is part of the Go 1 promise? > I hope not. If you want to handle a specific error, what you should do is file an issue to expose that error as a type (and thus make it part of the API of the package), not to match strings - precisely *because* they aren't part of the stable API, if they are not exposed, so shouldn't be relied on. For your specific case, have you tried `errors.Is(err, syscall.Errno(syscall.ENETUNREACH))`? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1f29dfd6-2f41-ac84-6ee8-c9ff0d4bf917%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfHbUACkrz0GVZDjftadPR2CqB%3DA3N%3D%2BRtH7NfJA8U3SFg%40mail.gmail.com.