Articles with the tag "errors"

When Should I Use One Liner if...else Statements in Go?

After using Go for a few weeks, chances are you are going to run across a single-line if...else statement. Most often, you will see this with an err (eg if err := doStuff(); err != nil { ... }). This article discusses the situations where a one-liner is appropriate, and ones where it isn't a great fit.

Avatar of Jon Calhoun
Articles and Tutorials by
Jon Calhoun

Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.

Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.

Recent Articles All Articles Mini-Series Progress Updates Tags About Me Go Courses

©2018 Jonathan Calhoun. All rights reserved.