About:

Hi, I'm Jonathan Hall. I'm on a mission to make Go approachable to people of all skill levels. Go is a simple language. That doesn't mean it's always obvious. I'll send you daily suggestions and advice to improve your understanding and control of the language so that you may boldly Go. Engage! Not convinced? Browse the archive. “Your content is a gold mine for Go devs! It's really obvious you have great knowledge in this space and you're a great orator!

Website:

Subscribe to RSS:
The post discusses various methods for handling errors in a range-over-func iterator in Go programming. It highlights the limitations of returning multiple values using iter.Seq2 and presents three alternative approaches: using a ...
The post discusses the implementation of custom iterators in Go, particularly focusing on a custom iterator version of a grep function. It outlines the structure of the Result type, which includes methods for setup, iteration, and...
The blog post discusses the drawbacks of channel-based iterators in programming, particularly focusing on error handling and the challenges of aborting iteration early. It illustrates the issues with unbuffered channels and sugges...
The post discusses the error handling differences between using a custom iterator and a range-over-func approach in programming. It highlights how the latter simplifies error checking by reducing the number of errors to monitor du...
The post discusses the implementation of iterators in Go, specifically focusing on a database method that retrieves user orders. It contrasts traditional slice-based retrieval with a channel-based approach, highlighting the benefi...
The blog post discusses the re-implementation of a non-iterating grep function using a channel for iteration in Go programming. It presents a code example that allows for reading results as they are encountered, improving efficien...
The blog post discusses managing errors in Go programming when using goroutines. It presents a naive implementation of handling errors in concurrent functions and identifies two main bugs: overwriting errors and data races. The au...
The post discusses the use of callbacks with iterators in programming, particularly in the context of querying REST APIs that return paginated results. It highlights the challenges of handling large items and pagination data, prop...
The post discusses the use of the x/sync/semaphore package in Go for implementing a global limit on the number of concurrent tasks, enhancing the errgroup package's SetLimit feature. It provides a code example demonstrating how to...
The post discusses a live coding session focused on Go programming, specifically addressing a common mistake with sync.WaitGroup and how Go 1.25's new method, sync.WaitGroup.Go, simplifies the process of managing goroutines. The a...
The post discusses variations of the custom iterator pattern in programming, particularly focusing on the Next() method. It highlights the option to eliminate the boolean return value when the zero value indicates completion, espe...
The text discusses the implementation and advantages of custom iterators in programming, particularly in handling lists of elements that may trigger errors. It highlights the standard methods associated with custom iterators, such...
The blog post discusses a live coding session focused on simplifying error handling in Go programming using the errgroup package. It contrasts the complexity of handling errors from multiple goroutines with a simpler approach prov...
The blog post discusses a common mistake in Go programming related to the use of the sync.WaitGroup. It explains that calling wg.Add(1) inside a newly spawned goroutine can lead to premature returns from wg.Wait(), as the goroutin...
A new feature in Go 1.26 enhances context cancellation by providing descriptive error messages for signals, improving graceful shutdown handling.
The post discusses a method for handling errors during iteration in Go programming using the iter.Seq2 pattern. It explains the implementation of a grep function that returns an iterator capable of yielding matches along with any ...
The post discusses the implementation of iterators, specifically using a grep utility as an example. It begins with a simple implementation that reads from an io.Reader and returns lines matching a regular expression. The author h...
The blog post discusses the new iterator implementation introduced in Go 1.23, specifically focusing on the 'range-over-func' feature. It explains how to use the db.Orders function to iterate over orders and introduces the iter.Se...
The post discusses various iterator patterns in programming, particularly in the context of Go language and goroutines. It begins by explaining the necessity of iterators for handling larger data sets efficiently, moving beyond si...
The post discusses the use of errgroup in Go programming to manage goroutines and handle errors effectively. It explains how to create an errgroup with a context that cancels all running goroutines if any one of them returns an er...
The blog post discusses a live coding session focused on handling errors from multiple goroutines in Go programming. It compares two methods: using a mutex with a shared error variable and using an error channel. The author explai...
The post discusses the implementation of a range-over-func iterator in Go, specifically focusing on a grep function that matches lines in a given input based on a specified pattern. It explains the code structure, including the us...
The blog post discusses the errgroup package in Go, specifically its ability to limit the number of concurrent goroutines. It illustrates this with an example of an HTTP handler that fetches customer orders, demonstrating how to s...
The post announces a live stream event focused on building a new feature in an open-source project, while also discussing the release of Go 1.25. It highlights that this release is minor, with no major new features or language cha...