Recent Posts

Defer

9 minute read

Why it’s important to use defer for maintainability and in the presence of panics. I also look at some common pitfalls.

Build Tags

12 minute read

The other “directive” that I didn’t cover last week is //go:build. This time I look at how and why you would use build tags and the new syntax.

Compiler Directives

31 minute read

A look at all of Go’s pragmas (except build tags). How //go:debug directive enhances Go’s backward compatibility. Plus recent changes to the language that af...