138 Followers
·
Follow

Image for post
Image for post
Wrapping and unwrapping errors is now part of Go!

Keep up with the latest additions in Go error handling

This post is part of the “Before you go Go” series, where we explore the world of Golang, provide tips and insights you should know when writing Go, so you don’t have to learn them the hard way.

The last time we visited this topic, we explained some core concepts in this area and how to handle errors properly. I recommend you take a look at the previous post, available here:

This time around, you’re going to update your stance on Error Handling in Go while taking a look at the changes and additions done in Go 1.13. …


Mastering pragmatic error handling in your Go code

Image for post
Image for post

This post is part of the “Before you go Go” series, where we explore the world of Golang, provide tips and insights you should know when writing Go, so you don’t have to learn them the hard way.

I assume you have at least some basic Go background, but if you feel at any point you’re not familiar with the materials discussed, feel free to pause, research and come back.

Now that we got all of this out of the way, let’s Go!

Go’s approach to error handling is one of its most controversial and misused features. In this article, you’ll learn how Go approaches errors and understand how they work under the hood. You’ll explore a couple of different approaches to it, take a look at the go source code and the standard library for some insights about how errors work and how to work with them. You’ll learn how Type Assertions play an important role in handling them, and see upcoming changes to error handling, planned to be released in Go 2. …


Part 0: Getting Started with Go

Image for post
Image for post
Welcome, baby gophers! (Get used to gophers, they’re adorable and they are here to stay…)

This post is the first piece, or actually our zero-th piece (we are developers, after all), of our new “Before you go Go” series, where we will explore the world of Go and provide tips and insights you should know when writing Go code, so you don’t have to learn them the hard way. Scroll down for a full list of the Before you go Go posts.

I’ll assume you have at least some basic Go background, but if you feel at any point you’re not familiar with the materials discussed, feel free to pause, research and come back.

Now that we got all of this out of the way, let’s Go! …

About

Alon Abadi

Back End Developer and Golang Enthusiast. I am a sucker for great code, and I like to hack whatever comes my way.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store