News for hackers. Stuff that matters.
Re:Russ Cox is stepping down as the Go tech lead by denysvitali on Friday August 02, 2024 @02:40AM (#41136627)
In this case, the if err != nil is completely useless.

Usually the pattern is used to perform better error handling (wrapping errors) or in case you call multiple functions that might return an error.

In this case, your suggestion is actually what I would expect to see

There are no comments on this comment yet.