Recent posts
Newest first- Go proposal tracker
A Go proposal tracker was built to provide quick summaries of implemented, accepted, and likely accepted proposals, with an RSS feed and weekly digest.
- A Go Gotcha: Context Keys Are Typed
A Go gotcha involves typed context keys, where different string types prevent context value lookups between packages.
- Probabilistic data structures in Go, part 2
Probabilistic data structures in Go, like the binary fuse filter, offer memory savings for approximate set membership checks with trade-offs in accuracy and mutability.
- Accepted proposal: omit the type in composite literals
Go 1.28 will allow omitting the type in composite literals when the type is already known by the compiler.
- Probabilistic data structures in Go
Probabilistic data structures offer approximate answers to data queries with reduced memory usage, and the Go package unsure implements these structures efficiently.
- Accepted proposal: grow an existing map with maps.Grow
Go's new maps.Grow function allows pre-allocating space in existing maps to avoid repeated reallocations and rehashing.
- gobench: a tool for comparing Go benchmark runs across branches
Gobench is a new Go tool designed to streamline the comparison of benchmark runs across different branches, improving upon manual scripting methods.
- Partial updates with field masks
Using an update_mask query parameter with PATCH requests allows APIs to differentiate between undefined, null, and updated fields.
- Relying on Go
Solod is a systems language for C and Go developers that is a literal subset of Go, reusing its tooling and standard library.
- Going Backward: Reinventing Go's iterator
Go's slices package Backward function iterates over slice elements in reverse order, evolving from simple copies to closures and callbacks.
- Accepted proposal: range over all command-line flags
Go's package flag proposal adds an IsSet field to flags, simplifying environment variable overrides by allowing direct iteration over all flags.
- Accepted proposal: Go examples with any signature
Go's proposal to allow examples with any signature, including parameters and return values, was accepted to improve documentation and testing capabilities.
- Supervised fire-and-forget in Go
A supervised fire-and-forget approach for Go goroutines uses a worker pool to manage background tasks, bounding concurrency and handling errors.
- On interactive Go tours
Interactive tours for Go releases, from 1.22 to 1.26, will no longer be published due to the author's decision to stop.
- GC shape stenciling in Go generics
Go's generics implementation uses GC shape stenciling, compiling one function body per type's GC shape rather than full monomorphization or type erasure.
- Modernizers & go fix
Go 1.26's rebuilt go fix tool automatically modernizes code by applying language and library updates, becoming a favorite feature for developers.
- Request coalescing with Go singleflight
Go's singleflight package deduplicates concurrent calls for the same key, preventing database stampedes by ensuring an expensive upstream operation runs only once.
- Solod 0.2: Networking, new targets, friendlier interop
Solod v0.2 introduces networking support for TCP, UDP, and Unix domain sockets, alongside expanded compilation targets and improved C interop.
- Channel iteration and goroutine leak
A custom cron scheduler's channel iteration misuse leads to a goroutine leak, which is fixed by closing the channel after all jobs report their outcomes.
- Accepted proposal: a goroutine leak profile in the Go standard library
Go 1.27 will include a goroutine leak detector in runtime/pprof, leveraging the garbage collector for provable detection of unrecoverable goroutines.
- How my minimal, memory-safe Go rsync steers clear of vulnerabilities
A minimal, memory-safe Go rsync implementation is examined for its effectiveness in mitigating security vulnerabilities present in the original C version.