-
How to parse a time or date in Go
Frustrated by time.Parse? You're not alone. This article will get you unstuck and moving again.
Thu 23 Nov, 2023Read now -
Anonymous structs in Go: What, How and When
This article explains anonymous structs for people who are unfamiliar with them.
Thu 16 Nov, 2023Read now -
Should you store *that value* in a Go context?
Not every value should be stored in a Go context, this article examines why.
Sun 12 Nov, 2023Read now -
Add value to a context in a type safe way
Don't litter your code base with keys and/or type assertions. Add and get values from contexts in a type safe way.
Sun 12 Nov, 2023Read now -
Dealing with large structs in tests
Are your tests growing out of control? This article explains how to deal with large structs in tests.
Thu 7 Sep, 2023Read now -
Build your own slice: Make, Literals and Re-slicing
So far we have only created slices by slicing arrays, but there are more convenient ways to create new slices. In this article we will look at make, literals and re-slicing.
Wed 30 Aug, 2023Read now -
Should you use slices of pointers to structs?
What is the difference between a slice of pointers and a slice of values? And when should you use one or the other? This article explains.
Sun 20 Aug, 2023Read now -
Should you use pointers to slices in Go?
What is the point of using pointers to slices? This article discusses when it's a good idea to use pointers to slices.
Thu 3 Aug, 2023Read now -
Build your own slice: Append and Copy
Append and copy are commonly used functions, but they can have some surprising behavior. This article helps you build a good intuition by showing you how to implement them yourself.
Tue 18 Jul, 2023Read now -
Build your own slice: Arrays and slices
An introduction to arrays, slices and their relationship. Get a solid mental model by implementing your own slice.
Mon 26 Jun, 2023Read now -
Choosing between context.Background() and context.TODO()
Some guidance on choosing the right constructor for your context (and one thing you should never do).
Fri 14 Apr, 2023Read now -
Confused by http.HandlerFunc? This post makes it click
If you're not yet comfortable with Go's type system and/or interfaces it can be a surprisingly difficult thing to wrap your head around. Read this post to learn how it works.
Fri 14 Apr, 2023Read now