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

#go #golang #concurrency #postgres #database #db
Download Telegram
πŸ€“ Tips for Building Bubble Tea Programs

Bubble Tea is a robust Go framework for creating terminal user interfaces (TUIs). Louis has invested significant time in developing PUG (a Terraform TUI) and shares the results of his experience here.

Link to the article

#go #article #cli
Please open Telegram to view this post
VIEW IN TELEGRAM
43πŸ‘2
πŸ€“ Slices in Go: Grow Big or Go Home

An in-depth exploration of slices, emphasizing how they expandβ€”a detail that can catch you off guard in your code if you’re not aware of it.

Link to the article

#go #article #slices
Please open Telegram to view this post
VIEW IN TELEGRAM
5πŸ‘3πŸ‘Ύ2
Dumb ways to die: Random Values in Pointers πŸ€“

Storing non-pointer values in unsafe.Pointer is generally a bad Idea, but why is that the case? What actually happens? Exploring this could provide you with a deeper understanding of pointers and the unsafe package.

Link to the article

#go #article #pointers
Please open Telegram to view this post
VIEW IN TELEGRAM
4πŸ‘2😁1πŸ‘Ύ1
Mastering ISO 8583 Message Networking with Golang ❀️

This article discusses how to implement networking for ISO 8583 financial transaction messages using Golang. It covers the creation of a Golang client to send and receive ISO 8583 messages over TCP/IP, focusing on asynchronous processing, message interleaving, and binary framing.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘53πŸ‘Ύ1
Telemetry in Go 1.23 and beyond πŸ‘Ύ

Go 1.23 provides a new way for you to help improve the Go toolchain. By enabling telemetry uploading, you can elect to share data about toolchain programs and their usage with the Go team. This data will help Go contributors fix bugs, avoid regressions, and make better decisions.


https://go.dev/blog/gotelemetry

#go #article #goblog
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘53πŸ‘€1
How Go Tests "go test" πŸ‘Ύ

How does Go, the project, and team behind it, test go test, the Go tool's command for running tests? Does Go test go test using the go test command? In this article, we explore the evolution of how the Go team tests the Go tool (go) and discuss strategies for testing command-line tools written in Go in general.


Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8πŸ”₯1
Building LLM-powered applications in Go ❀️

The post explores various methods for setting up a Retrieval-Augmented Generation (RAG) server using different toolchains: Gemini + Weaviate, LangChain, and Genkit. Go’s inherent strengths appear to align well with the demands of the modern LLM/RAG ecosystem.

https://go.dev/blog/llmpowered

#go #article #goblog
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘54πŸ”₯1
Notes on running Go in the browser with WebAssembly πŸ‘Ύ

Eli covers the basics of invoking Go from JavaScript, manipulating the DOM, using TinyGo to reduce the size of the resulting WASM binary, and running tasks concurrently with Web Workers.

Lint to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯3πŸ‘21
Using Go instead of bash for scripts πŸ‘Ύ

Replacing your scripts with Go allows you to write them once for all platforms, eliminating the need to relearn OS-specific scripting languages. While it may involve more code, the trade-off could be well worth it.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6πŸ€”42
What's in an (Alias) Name? πŸ€“

Generic alias types are set to arrive in Go 1.24 (anticipated in February 2025) as part of this proposal, expanding on both type aliases and generics. One key use case for type aliases is enabling refactoring without breaking compatibility. Robert breaks down the fundamentals of type aliases and explains why integrating them with generics required additional effort.

https://go.dev/blog/alias-names

#go #article #goblog
Please open Telegram to view this post
VIEW IN TELEGRAM
5πŸ‘3
Sets in Go πŸ€“

Go doesn’t offer a native set type, and the standard library doesn’t provide one either. So, how do you create sets in Go?


Link to the article

#go #article #gomap #map
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6πŸ”₯3πŸ₯°11
Joining errors in Go 🀑

A useful comparison of two methods: employing multiple %w verbs and leveraging errors.Join, introduced in Go 1.20.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘43
Writing raw SQL easier with pgx and sqlc in Go πŸ€“

The author offers several tips and solutions on how to use pgx and sqlc to simplify writing sql code.

Link to the article

#go #article #sql
Please open Telegram to view this post
VIEW IN TELEGRAM
5πŸ‘3πŸ‘Ύ1
6 Tips for Using Strings in Go πŸ€“

If you are coming to Go from another language like Ruby or Python there are a lot of changes to take in, and many of these revolve around the string type. Below is a list of some quick tips that answered questions I had during my first few weeks using Golang.

Link to the article

#go #article #strings
Please open Telegram to view this post
VIEW IN TELEGRAM
6πŸ‘4πŸ”₯2
Database Transactions in Go with Layered Architecture

This article on Three Dots Labs talks about handling database transactions in Go using a layered architecture. It covers how to structure repositories for clean transaction management, keeping logic in command handlers, and using domain models effectively. It also explains the UpdateFn pattern for updating data in a neat way and the Transaction Provider pattern for managing transactions across multiple repositories without overcomplicating things

Link to the article

#go #article
πŸ‘5πŸ”₯43❀1
Go sync.Map: The Right Tool for the Right Job ❀️

The newest edition of Phuong’s acclaimed, illustrated handbook on Go concurrency explores sync.Map, a thread-safe map that allows concurrent reads and writes across multiple goroutines without the need for explicit locking. However, as Phuong discovers, it isn’t always the optimal solution.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘64πŸ†’1
Writing a Circuit Breaker in Go 🀑

When you require a method to halt the repeated attempts of a failing operation, a circuit breaker offers an elegant solution to identify failures and facilitate recovery by implementing a cooldown period.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
27πŸ‘1πŸ‘Ύ1
Using Go Embed ❀️

The go:embed feature simplifies the inclusion of static assets in your Go applications. By embedding files and directories at compile time, you can create more portable and self-contained binaries.

Link to the article

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘53
Try HTML components in pure Go 🀑

gomponents are HTML components in pure Go. They render to HTML 5, and make it easy for you to build reusable components. So you can focus on building your app instead of learning yet another templating language.

Link to the component

#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
14πŸ‘2πŸ†’1