Need for clarification on go1.13-errors blog page

65 views
Skip to first unread message

Reha S

unread,
May 2, 2021, 1:58:34 PM5/2/21
to golang-nuts
Hi Everyone, 

On https://blog.golang.org/go1.13-errors there's a sentence: 

"It is usually better to use errors.Is or errors.As, however, since these functions will examine the entire chain in a single call.

This sentence sounds like it has more to it, or the word however is an extra word. If both are not true, could someone explain what it means please?

New to golang and first time posting here so I'm not sure if this is the right format or the place. Some guidance on that would be much appreciated. 

Best,
Reha

Axel Wagner

unread,
May 2, 2021, 2:03:59 PM5/2/21
to Reha S, golang-nuts
You can put the "however" at the beginning of the sentence:

"The errors package also includes a new Unwrap function […]. However, it is usually better to use errors.Is or errors.As, since these functions will examine the entire chain in a single call."

This is the intended meaning. I agree that it's a bit janky as it is.


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9a2effb4-bff1-449d-9e6f-180b5a8aeb29n%40googlegroups.com.

Reha S

unread,
May 2, 2021, 2:52:09 PM5/2/21
to golang-nuts
Great, thanks. 
Reply all
Reply to author
Forward
0 new messages