Deferred teardown closure in Go testing

While watching Mitchell Hashimoto’s excellent talk1 on Go testing, I came across this neat technique for deferring teardown to the caller. Let’s say you have a helper function in a test that needs to perform some cleanup afterward. You can’t run the teardown ins...

How and why PlanetScale built a VM in Go

#​547 — March 26, 2025 Unsub  |  Web Version Go Weekly Go on the PlayStation 2 — If you like tinkering with consoles and shoe-horning Go into new (or old?) environments, this post is for you. It involves TinyGo, C, and a lot of t...

Goodbye core types - Hello Go as we know and love it!

Go 1.25 simplifies the language spec by removing the notion of core types

Things fall apart

The night is dark and full of errors—and durable Rust software is not only ready for them, but handles them sensibly. Let’s see how, by returning to our line-counter project.

Three flavors of sorting Go slices

There are primarily three ways of sorting slices in Go. Early on, we had the verbose but flexible method of implementing sort.Interface to sort the elements in a slice. Later, Go 1.8 introduced sort.Slice to reduce boilerplate with inline comparison functions. Most recently, Go 1...

Go's choice of multiple return values was the simpler option

Go's multiple return values and (Go) types

When you shouldn’t use frameworks in Go

Quick takeaways Frameworks promise productivity but often lead to issues as projects get larger and more complex. The Go community prefers small, focused libraries over frameworks due to Go’s design philosophy influenced by Unix principles. Watch out for risks using framew...

Forget TypeScript, how about porting Doom to Go?

#​546 — March 19, 2025 Unsub  |  Web Version Go Weekly Traversal-Resistant File APIs — Among the lesser known new features in recent versions of Go are some ways to improve file system security when end user input might have an i...

Custom YAML marshal/unmarshal with Go

string and []string can be the same thing…