Golang Digest
2.49K subscribers
164 photos
1 video
190 links
Everything about Go: news, articles, tools, language changes, etc.

#go #golang #concurrency #postgres #database #db
Download Telegram
How We Slashed API Response Times by 50% with Go Compiler Optimizations πŸ’ͺ

I still remember the day our CTO walked into our team meeting with that look on his face. Our API response times were tanking, and customers were NOT happy. What I didn’t realize then was that we’d end up solving the problem by digging into Go compiler optimizations, not by throwing more hardware at it or rewriting everything from scratch.


Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ”₯4πŸ†’4❀2
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
1πŸ‘5πŸ”₯32
Timeout Middleware in Go: Simple in Theory, Complex in Practice πŸ”¨

I’ve been happily using standard timeout middleware in my Go services, until one day I needed to add a new file upload endpoint that required a much longer timeout than the others. What seemed like a one-minute job turned into an unexpected challenge.
Let’s explore how to build a robust, chainable timeout middleware that solves these challenges.


Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6πŸ‘4✍3
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
1πŸ‘7❀3πŸ”₯2🀩1
Golang on the PlayStation 2 πŸ’ͺ

Let’s get straight into it: I want to run code into consoles (more on why this in a future post). Normally this is done in low(er) level languages, but nowadays we have better and easier to work with languages such as Go. So I was wondering.. why not?


Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘6πŸ”₯3❀2🀩1
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
πŸ”₯4πŸ‘2❀1
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
1πŸ”₯6πŸ‘3❀1
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
1πŸ‘5πŸ”₯4
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
πŸ”₯4πŸ‘3❀2
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
1πŸ”₯4πŸ‘1
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
πŸ”₯5πŸ‘4❀2
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
1❀5πŸ‘2πŸ”₯1
Golang sync.Pool is not a silver bullet πŸ“†

When it comes to performance optimization in Go, sync.Pool often appears as a tempting solution. It promises to reduce memory allocations and garbage collection pressure by reusing objects. But is it always the right choice? Let's dive deep into this fascinating topic.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯8πŸ‘2
Cheating the Reaper in Go πŸ“†

The article shows how to build a high-performance arena allocator in pure Go using unsafe, bypassing the garbage collector for manual memory control.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯6πŸ‘2
Optimizing Heap Allocations in Golang: A Case Study πŸ“†

The article explains how a small change in Go code caused unexpected heap allocations and performance drops, highlighting the importance of understanding escape analysis.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ”₯3πŸ‘1
This 150-Line Go Script Is Actually a Full-On Load Balancer πŸ”¨

A Simple HTTP Load Balancer in Go Using Standard Library, In this implementation, we'll use a round-robin algorithm to evenly distribute incoming requests among a collection of backend servers.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
3πŸ”₯8❀3πŸ‘2
SIGHUP Signal for Configuration Reloads ❀️

SIGHUP is a signal caught between two worlds. It was born from the physical "hang up" of terminal lines, and its original meaning β€” the loss of a controlling terminal β€” still applies.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
2πŸ”₯4πŸ‘3
Graceful Shutdown in Go: Practical Patterns πŸ”¨

Graceful shutdowns can be the difference between a smooth user experience with reliable data and frustrated users (or yourself) dealing with data corruption. By following and adapting this five-step approach, you can shut down safely and avoid potential problems.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯4πŸ‘3
Green Tea 🍡 Garbage Collector

The "Green tea" garbage collector attempts to operate on memory in contiguous blocks rather than the current tri-color parallel marking algorithm that operates on individual objects without much consideration for memory location.

Link to the proposal

#go #go@digest_golang #proposal #proposal@digest_golang
❀2πŸ‘2πŸ”₯2
Centralize HTTP Error Handling in Go πŸ”¨

In this short post, I'll share with you a simple pattern I use to centralize error handling for my HTTP handlers.


Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
2πŸ”₯3πŸ‘2❀1
How Go Scheduler Works πŸ“†

Understanding the Go scheduler is crucial for Go programmer to write efficient concurrent programs. It also helps us become better at troubleshooting performance issues or tuning the performance of our Go programs. In this post, we will explore how Go scheduler evolved over time, and how the Go code we write happens under the hood.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
2πŸ”₯3❀2πŸ‘1