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


title: When Should I Use One Liner if...else Statements in Go? date: 2020-11-16 08:42:19 categories: [programming] tags: [golang]

authors: sedlav

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 a

Link