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
VictoriaMetrics
Slices in Go: Grow Big or Go Home
Slices are way more flexible than arrays since theyโre basically a layer on top of an array. They can resize dynamically, and you can use append() to add more elements.
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
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
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
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
Pavel Gabriel
Mastering ISO 8583 Message Networking with Golang
In the previous post, Mastering ISO 8583 Messages, we looked at how to create specifications in Go, set data to messages, and finally, how to ge...
๐5 3๐พ1
Telemetry in Go 1.23 and beyond ๐พ
https://go.dev/blog/gotelemetry
#go #article #goblog
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
๐5 3๐1
How Go Tests "go test" ๐พ
Link to the article
#go #article
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
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
go.dev
Building LLM-powered applications in Go - The Go Programming Language
LLM-powered applications in Go using Gemini, langchaingo and Genkit
๐5 4๐ฅ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
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๐2 1
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
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๐ค4 2
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
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
go.dev
What's in an (Alias) Name? - The Go Programming Language
A description of generic alias types, a planned feature for Go 1.24
Sets in Go ๐ค
Link to the article
#go #article #gomap #map
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๐ฅฐ1 1
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
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
tpaschalis.me
Joining errors in Go
I recently realized that the stdlib errors package in Go supports joining
multiple errors in addition to the more common %w wrapping.
multiple errors in addition to the more common %w wrapping.
๐4 3
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
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
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
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
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
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๐ฅ4 3โค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
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
VictoriaMetrics
Go sync.Map: The Right Tool for the Right Job
Goโs sync.Map isnโt a magic bullet for all concurrent map needs. Itโs got some good tricks up its sleeve, like handling reads without locking, but itโs not always the best choice. This article dives into how sync.Map works under the hood, from its two-mapโฆ
1๐6 4๐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
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
2 7๐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
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๐5 3
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
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
1 4๐2๐1
How to work with GitHub API in Go โค๏ธ
A useful 22-minute guide on how to work with the GitHub API in Go.
https://www.youtube.com/watch?v=Dnyu0JkKSQc
#go #video #github
A useful 22-minute guide on how to work with the GitHub API in Go.
https://www.youtube.com/watch?v=Dnyu0JkKSQc
#go #video #github
Please open Telegram to view this post
VIEW IN TELEGRAM
YouTube
How to work with GitHub API in Go
In this episode we create a GitHub OAuth application in Go that lets users authenticate with GitHub and calls GitHub API on their behalf.
Code: https://github.com/plutov/packagemain/tree/master/28-github-api
GitHub API Go Client: https://github.com/google/goโฆ
Code: https://github.com/plutov/packagemain/tree/master/28-github-api
GitHub API Go Client: https://github.com/google/goโฆ
1๐5 5
Optimising and Visualising Go Tests Parallelism: Why more cores don't speed up your Go tests โค๏ธ
This article discusses optimizing parallelism in Go tests, focusing on how Goโs
Link to the article
#go #article #tests
This article discusses optimizing parallelism in Go tests, focusing on how Goโs
t.Parallel()
method can improve test performance by allowing certain tests to run concurrently. It also explains why adding more CPU cores doesnโt always speed up tests and introduces a custom tool for visualizing test execution.Link to the article
#go #article #tests
Please open Telegram to view this post
VIEW IN TELEGRAM
2๐ฅ7 3โค1