An interesting way to visualize large projects by way of go test -coverprofileβs results.
https://github.com/nikolaydubina/go-cover-treemap
#go #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
π3π₯1
The author shows by example how you can implement dependency injection between components using the wire library from google.
The library allows you to implement compile-time dependency injection without using reflection, which can speed up the time and speed of your application.
Link to the article
#go #article #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
π3
State Machine is a very useful pattern that can actually be used in practice quite often. The author explains and shows how to implement the State Machine pattern in golang, which can be executed both synchronously and asynchronously
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π2π₯1
Redis is currently the most popular key-value database. When using Redis in Go applications, you may encounter issues with multithreading. The author of the article demonstrates these potential problems and explains how to solve them using Redis's built-in features.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯2π1
As we know, Go excels at processing large volumes of data quickly and efficiently. In today's article, Sourav Choudhary walks us through creating a scalable worker pool in Go, providing clear, step-by-step instructions and advice to avoid common pitfalls that could impact performance.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π2π₯1
Heap is an important data structure that helps understand how the language and many applications work. The author compares how heaps function in Golang and Python, and then discusses a few libraries in Go that implement heaps, highlighting the pros and cons of each.
Link to the article
#go #datastructure #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯2π1
The Makefile is an essential component found in almost every large Go project. However, make has its downsides - it's not very flexible, and the commands can often be complex and hard to read.
The author of the article discusses two tools that can replace make: Taskfile, which allows you to describe instructions in the familiar YAML format, and Mage, an alternative tool that lets you write Makefile-like instructions in Go, offering greater flexibility.
Link to the article
#go #tool #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π3π₯2
Upon discovering that repositories with no Go code were included in Go's checksum database, the author decided to investigate whether arbitrary data could be uploaded to Go's servers and to determine if this posed a significant security concern.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯4
Go applications often work with the gRPC protocol, which is faster than standard REST. When working with gRPC, you might find an excellent open-source tool called Buf very useful. Buf helps manage your proto files by generating a unified file from those located in different directories (e.g., you can separate your projectβs proto files from vendor proto files). Additionally, Buf includes linters that check your proto files and prevent errors, along with many other features that simplify working with proto files.
Link to the official website
#go #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
π4π₯2
State Machine pattern is a complex and truly necessary pattern, the implementation of which can reduce the complexity and simplify the readability of the code. The article explains when this pattern can and should be implemented, what it can replace, and how it simplifies the development of complex projects.
Link to the article
#go #article #pattern
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯4π1
A proposal has been accepted and approved, according to which Go will support iterators starting from version 1.23. The inclusion of iterators in the language provides the ability to iterate over streaming data, which can be critically important at times. Here's an interesting discussion on Reddit with many examples demonstrating that iterators and the capabilities they bring make up for the increased complexity of the language.
#go #proposal
Please open Telegram to view this post
VIEW IN TELEGRAM
π3π₯2
When developing large-scale products, it's crucial to understand how much resources our application consumes. Go offers a set of built-in profiling tools that can assist in optimizing resource usage and detecting memory leaks. For an excellent article on this topic with plenty of examples, follow the link.
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π5π₯1
A video from freeCodeCamp that covers the complete development cycle of a decentralized distributed file storage system with content-based addressing in Go. This system can handle very large volumes of data. The video includes designing, developing, and working with network protocols.
https://www.youtube.com/watch?v=IoY6bE--A54
#go #video
Please open Telegram to view this post
VIEW IN TELEGRAM
YouTube
Distributed File Storage In Go β Full Course
Learn how to build a decentralized, fully distributed content-addressable file storage system using Go that can handle and stream very large files. This course covers system design, low-level programming, and network protocols, all while building a highlyβ¦
π8
Earlier, we shared Cloudflare's experience with optimizing their Go applications using PGO (Profile-Guided Optimization), which has been available in Go since version 1.20.
Next up, we have an article from Grab detailing their experience compiling applications with PGO flags. Spoiler alert: they managed to reduce CPU usage by 10-30% for some applications!
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π5π₯1
The article discusses the performance impacts of various error-handling strategies in Go. The author benchmarks different methods, finding that using sentinel errors combined with errors.Is() can slow down code execution by over 500%. The analysis includes comparisons of performance for different scenarios and offers insights into best practices for error handling in Go to optimize performance.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π6
The library implements a wide range of familiar string manipulation functions that are built into other languages but not available in Go. For example, it includes
ShuffleSource()
, similar to str_shuffle
in PHP, and SwapCase()
, similar to str.swapcase
in Python or String#swapcase
in Ruby.https://github.com/huandu/xstrings
#go #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
π7π₯3
The article explains how to manage database connections in Go, focusing on connection pooling to optimize performance and resource use. It details the benefits of reusing connections instead of creating new ones, outlines implementation steps in Go, and offers best practices for efficient database interaction at scale.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π9β€2
This article, written by a Google engineer, discusses why you shouldnβt simply proxy errors in Go without additional processing, the importance of wrapping errors, and how doing otherwise can lead to problems with mixing the domains of your application.
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π4π₯2
Goyave an opinionated all-in-one Golang web framework focused on REST APIs, with emphasis on code reliability, maintainability and developer experience.
https://github.com/go-goyave/goyave
#go #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯4π2
MiΕosz SmΓ³Εka, the author of "Go with Domains," has written an intriguing article on setting up Server-Sent Events (SSE) using Go, Google Pub/Sub, and htmx. The result is a fascinating project that allows clients to receive updates without using JavaScript. For example, when one site user posts a comment, it automatically appears for all other users without needing to refresh the page. Cool!
Link to the article
#go #article
Please open Telegram to view this post
VIEW IN TELEGRAM
π6β€4π₯2