Golang Digest
2.58K subscribers
163 photos
1 video
189 links
Everything about Go: news, articles, tools, language changes, etc.

#go #golang #concurrency #postgres #database #db
Download Telegram
Map internals in Go 1.24 🔨

Maps in Go 1.24 have undergone a complete rewrite, significantly improving their performance. The new implementation draws inspiration from Google's high-performance hash map design known as Swiss Tables.
Let's figure out how they work now.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
A database written fully in Go 🔨

A Reddit user shared their project — a minimalist persistent relational database written in Go. The main focus was on storage management and transactions. Indexes are implemented using a B+ Tree, and parallel data reading is supported.

Awesome project!

Link to the repo

#go #go@digest_golang #project #project@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Testing concurrent code with testing/synctest 🤓

One of Go’s signature features is built-in support for concurrency. Goroutines and channels are simple and effective primitives for writing concurrent programs.However, testing concurrent programs can be difficult and error prone.

In Go 1.24, the go team are introducing a new, experimental testing/synctest package to support testing concurrent code. This post will explain the motivation behind this experiment, demonstrate how to use the synctest package, and discuss its potential future.

Link to the article


#go #go@digest_golang #article #article@digest_golang #goblog #goblog@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
How to manage tool dependencies in Go 1.24+ 📆

Historically, managing dependencies — especially in a team setting — has been tricky. The previous solutions have been to use a tools.go file or the go run pattern, but while these approaches work, they’ve always felt like workarounds with some downsides.
With Go 1.24, there’s finally a better way.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Faster Go maps with Swiss Tables 📆

Go 1.24 includes a completely new implementation of the built-in map type, based on the Swiss Table design. In this blog post we’ll look at how Swiss Tables improve upon traditional hash tables, and at some of the unique challenges in bringing the Swiss Table design to Go’s maps.

Link to the article

#go #go@digest_golang #article #article@digest_golang #goblog #goblog@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Tips to debug hanging Go programs 📆

If your Go app becomes unresponsive, these tips can help you identify the issue by forcing a stack trace or using Delve to attach to the process (or core dump) and revive the program.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Different ways of working with SQL Databases in Go 👴

In this article, we'll explore and compare most popularly used Go packages for relational databases with hands-on examples, pros and cons. We will also briefly touch on the topic of database migrations and how to manage them in Go.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
From unique to cleanups and weak: new low-level tools for efficiency ❤️

An overview of two new features in Go 1.24’s garbage collector: runtime.AddCleanup and weak.Pointer. Cleanups work similarly to finalizers but avoid some of their issues by not reviving the objects they are linked to. Weak pointers allow referencing objects without stopping them from being garbage collected.

Link to the article

#go #go@digest_golang #article #article@digest_golang #goblog #goblog@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Go Structs and Interfaces Made Simple 🔨

In this blog post, we'll demystify Go's structs and interfaces, exploring how they differ from classes in traditional OOP languages and why Go's approach leads to more maintainable and flexible code. Whether you're new to Go or have been using it without fully grasping these concepts, this guide aims to make these foundational elements click.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
golangci-lint v2 ❤️

The second version of the most popular linter for go has been released: golangci-lint!
In this article, the author explains what has changed and what has been improved.

Link to the release note

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Faster interpreters in Go: Catching up with C++ 💪

PlanetScale is a popular cloud-based MySQL hosting service that uses Vitess, a MySQL scaler built with Go. This article tells the story of creating a virtual machine in Go to work with the SQL ASTs generated by their SQL parser—and how it performs as fast or even faster than MySQL’s C++ implementation.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
How I Scaled a Golang App to Handle 1.5M Requests Per Minute 📆

Great article where the author gives a set of rules that allow him to write high-load applications in Go.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
A Guide to Optimizing for High Performance in Go 🔨

A growing collection of technical articles designed to help Go developers build faster, more efficient applications. It starts by covering common patterns like object pooling, struct field alignment, and worker pools, with a high-performance networking guide coming soon.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Faster shuffling in Go with batching 🔨

Random integer generation is a fundamental operation in programming, often used in tasks like shuffling arrays. Go’s standard library provides convenient tools like rand.Shuffle for such purposes. You may be able to beat the standard library by a generous margin. Let us see why.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
More predictable benchmarking with testing.B.Loop ❤️

Go developers who have written benchmarks using the testing package might have encountered some of its various pitfalls. Go 1.24 introduces a new way to write benchmarks that’s just as easy to use, but at the same time far more robust: testing.B.Loop.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Using Signals With Go 📆

Signals are asynchronous messages delivered to processes to inform them of events such as interrupts, crashes, or termination, or to initiate specific actions. Most programming languages provide mechanisms to catch and handle signals — for example, to enable a program to shut down gracefully — and Go supports this as well.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Where and why should you use iterators in Go? ❤️

In this article, I decided to dive in and figure out where iterators could actually be useful in practice. I read a bunch of articles, checked out developers’ feedback, asked around on Reddit — and in the end, I put together a list of cases where iterators can genuinely come in handy. I’ve already used a few of them in my own projects, and I’ve got to admit — it turned out to be pretty convenient.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM