this post was submitted on 25 Sep 2023
5 points (64.7% liked)

Golang

2163 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS
 

Did I break a taboo by doing this?

you are viewing a single comment's thread
view the rest of the comments
[–] dbx12@programming.dev -4 points 1 year ago

I too consider that if err != nil a bit complicated to type. Most times, I wrap it away in a function like your Check0. I know that the major "framework" for command line applications (cobra) has a similar logic with its checkError function.