Some Useful Patterns for Go's os/exec
We're building Dolt, the world's first SQL database with Git-like version control. Dolt has a large test suite, partly in golang unit tests and partly in bats, a framework for writing tests that run in Bash and can easily test many interactions with standalone programs.https://www.dolthub.com/blog/2022-11-28-go-os-exec-patterns
Testing some of Dolt's features, like standby replication, requires spawning and coordinating multiple processes. Bats and Bash wasn't the right tool for the job. Luckily, Go has great facilities for spawning and interacting with background processes. While running processes from Go is not as concise as running them from the shell, it has robust facilities for error handling and concurrency.
d2
D2 is a modern diagram scripting language that turns text to diagrams.https://github.com/terrastruct/d2
Effective Error Handling in Golang
In this article, I’ll demonstrate the basics of handling errors in Go, as well as some simple strategies you can follow in your code to ensure your program is robust and easy to debug.https://earthly.dev/blog/golang-errors
Tutorial: Getting started with generics
This tutorial introduces the basics of generics in Go. With generics, you can declare and use functions or types that are written to work with any of a set of types provided by calling code.https://go.dev/doc/tutorial/generics
Crimes with Go Generics
This post is full of ways that you should not use Go generics in production.https://xeiaso.net/blog/gonads-2022-04-24
Get familiar with workspaces
Workspaces in Go 1.18 let you work on multiple modules simultaneously without having to edit go.mod files for each module. Each module within a workspace is treated as a main module when resolving dependencies.https://go.dev/blog/get-familiar-with-workspaces
A Guide to the Go Garbage Collector
This guide is intended to aid advanced Go users in better understanding their application costs by providing insights into the Go garbage collector. It also provides guidance on how Go users may use these insights to improve their applications' resource utilization. It does not assume any knowledge of garbage collection, but does assume familiarity with the Go programming language.https://go.dev/doc/gc-guide
New in Go 1.20: wrapping multiple errors
https://lukas.zapletalovi.com/posts/2022/wrapping-multiple-errors
https://lukas.zapletalovi.com/posts/2022/wrapping-multiple-errors
Why We Write Everything in Go
At Bitly, we’ve been all in on Go as our preferred back-end language since about 2015.https://bitly.com/blog/why-we-write-everything-in-go
How We Write GitHub Actions in Go
https://full-stack.blend.com/how-we-write-github-actions-in-go.html
https://full-stack.blend.com/how-we-write-github-actions-in-go.html
nsq
NSQ is a realtime distributed messaging platform designed to operate at scale, handling billions of messages per day.https://github.com/nsqio/nsq
The Go libraries that never failed us: 22 libraries you need to know
We only wanted to include libraries we used on real production systems. Thanks to that, we recommend just libraries that we are 100% sure about.https://threedots.tech/post/list-of-recommended-libraries
watermill
Building event-driven applications the easy way in Go.https://github.com/ThreeDotsLabs/watermill
Designing Go Libraries: The Talk: The Article
This is a long-form version of a talk I gave in 2018 providing guidance on designing libraries in Go.https://abhinavg.net/2022/12/06/designing-go-libraries
Go 1.20 Experiment: Memory Arenas vs Traditional Memory Management
https://pyroscope.io/blog/go-1-20-memory-arenas
https://pyroscope.io/blog/go-1-20-memory-arenas
Improving Observability of GoLang Services
https://flow.com/engineering-blogs/golang-services-improving-observability
https://flow.com/engineering-blogs/golang-services-improving-observability