|
🔗 Stories, Tutorials & Articles |
|
|
|
What’s New in Go 1.20? |
|
|
A series of 3 blog posts about what's new in Go 1.20, the first one is about the changes to the language. The author mentions that the changes in Go 1.20 are somewhere in between Go 1.18 and 1.19, but more features and solutions to longstanding problems than 1.19. |
|
|
|
|
|
|
When to use gRPC vs GraphQL ✅ |
|
|
Stackoverflow blog post compares the features and use cases of gRPC and GraphQL. The author discusses the similarities between the two protocols, including typed interfaces with codegen, abstracting away the network layer, and the ability to have JSON responses. The strengths and weaknesses of each protocol are also discussed. The author concludes that gRPC is the best choice for server-to-server communication, while GraphQL is the best choice for client-server communication. However, there are exceptions, such as when using GraphQL federation or schema stitching to create a supergraph of all business data, or when needing field-level visibility on usage. |
|
|
|
|
|
|
The exasperated engineers guide to IPs in Golang |
|
|
In this article, the author delves into the differences between using net.IP and netip.Addr in Go when storing IP addresses. The author explains that net.IP and netip.Addr were created for different reasons, and while netip.Addr is always better, working with net.IP is a pain due to its underlying implementation as a byte-slice and its lack of comparability. The author also argues that the byte-slice is not an ideal abstraction for network addresses and suggests using a uint64 instead. |
|
|
|
|
|
|
Golang memory arenas |
|
|
Go 1.20 release added new experimental arena package that provides memory arenas. This article explains what memory arenas are and how you can use them to reduce garbage collection overhead and make your programs faster. |
|
|
|
|
|
|
Golang Hacks — Go Executable That Contains Another Executable |
|
|
This post is a guide on how to write a Go program that runs another executable file and includes that file as part of the final executable. The process includes adding the executable file to the Go project directory, creating an embed file variable to reference the file in the code, adding a "WriteFile" statement to write the file to the current directory at runtime, running the executable file using the exec package, and removing the created file after execution. The final step is to build the Go program, which will create a new executable that includes the other file, eliminating the need for the separate executable file. |
|
|
|
|
|
|
Embedding Our New React UI in Go |
|
|
The Flipt team is in the process of releasing a new version (1.17) of their platform, which includes updates to the user interface. They have decided to transition from using Vue.js to React as their frontend framework. They experimented with using Next.js but ran into challenges such as bundling the Next.js application into a Go binary and missing assets. They ultimately decided to use plain-old React with hash-based routing. The goal of this transition is to make the frontend more appealing to potential contributors, as React is more widely used in the industry. They're learning by doing and encountering some challenges along the way. |
|
|
|
|