Atomic Operations in Go
How I actually use sync/atomic for lock-free programming when a mutex is too heavy, and the weird edges you hit along the way.
Category // go
7 entries filed under this category.
How I actually use sync/atomic for lock-free programming when a mutex is too heavy, and the weird edges you hit along the way.
The new(expr) syntax in Go 1.26 should have let me delete my generic ptr[T] helpers. It almost did.
How to use bitwise flags, bitmasks, and iota for configuration in Go. Learn bitwise OR, AND, XOR operations, set/clear/toggle patterns, and practical examples with JSON serialization.
How I used Go to automate the tedious part of Factorio's circuit network: building a self-monitoring mall for roboports and spaceships.
A look into implementing a rolling Adler32 checksum in Go, inspired by the rsync algorithm and Andrew Tridgell's research.
Mocks often lie. Here is why I prefer using Testcontainers for integration testing to ensure my code actually works with a real database.
How I actually structure Go microservices. A hands-on look at why I prioritize explicit dependencies, type-safe SQL, and internal boundaries.