🇺🇦 #​411 — May 13, 2022

Unsubscribe  |  Read on the Web

The Go Weekly Newsletter

Changing One Character Wildly Improved Segment's App Performance — In terms of value per keypress, you can’t beat this, surely. Segment’s engineers noticed some sluggishness in a Go-powered system, used pprof to see what was going on, and discovered a tiny change to a sorting comparison function would pay huge dividends.

Kevin Burke (Segment)

▶  How to Refactor Cloud Apps in Go 1.18 with Generics — A 20-minute talk from this week’s Google I/O event by two Googlers that introduces Go 1.18’s generics feature, how they differ to other implementations, why to use them, plus a practical demo of refactoring a Go 1.16 app. Easy to follow – a good primer.

Cameron Balahan and Cody Oss

Efficient Infrastructure with DNSimple's Terraform Provider — Use DNSimple’s Terraform provider to manage DNS like with other cloud services, update DNS records & manage DNS infrastructure. Or use the DNSimple Consul integration to automatically provision DNS records from Consul in our authoritative name servers.

DNSimple sponsor

How to Use go run to Manage Tool Dependencies — Did you know that since Go 1.17 you can use go run to run things in remote packages that aren’t even related to your current project/go.mod?

Alex Edwards

Quick bits:

Jobs

Golang Developer at X-Team (Remote) — Join the most energizing community for developers and work on long-term projects for Riot Games, FOX, Sony, Coinbase, and more.
X-Team

Golang Engineers — 100% Remote (North/South America & Europe) — We’ve got several opportunities for Go devs (some working directly with Bill Kennedy!) and would love to hear from those looking for new challenges in distributed systems projects.
Ardan Labs

Backend Engineer | Remote Within CET (-3/+3 Hours) | Full-Time — Join us as a Backend Engineer to create the finance solution all businesses love - Tailor made remote policy or relocation package.
Qonto

Find a Job Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.
Hired

Of Ducks and Go Interface Misuse — It’s easy to create interfaces when reuse needs arise, but it’s also easy to create bad interfaces that make things harder for developers to use later.

Bart Bucknill (8th Light)

Shrink Your TinyGo WebAssembly Modules by 60% — Every byte matters when you’re sending it down the wire to be run in a browser, so going from 1.1MB to 377KB in this case with the same source file was a big win.

Matt Butcher

testscript: Define Filesystem-Based Tests by Creating Scripts — Originally created for testing the Go compiler itself, testscript makes filesystem-based testing simple with just a few Unix-like commands and intuitive utilities to check test success. This post shows it off.

André Eriksson

Go's Concurrency Examples in Java 19 — Java is about to get support for ‘virtual threads’ which are vaguely similar to goroutines, and the author of this article wanted to compare some Go examples with what the equivalent Java will be. Go certainly wins when it comes to tighter, more readable code!

Ethan McCue

SSRF Attack Examples and Mitigations

Teleport sponsor

Notes on Practical Concurrency in Go — Not exactly a tutorial but a set of notes around a variety of concurrent related mechanisms in Go including mutexes, channels, patterns for distributing tasks, etc.

Lucas Alves

▶  What to Do When Projects Get Big and Messy — The Go Time podcast tackles the topic of software maintenance again. (66-minutes.)

Go Time Podcast podcast

Panic Recovery in Go — Don’t defer reading this article. (I’ll see myself out.)

Elliot Forbes

How to Pixelate Images in Go
Anon

🛠 Code & Tools

cast: Safe and Easy Casting From One Type to Another — It’s as easy as using ToString, ToInt, ToTime and more.

Steve Francia

RoseDB 1.0: A High Performance NoSQL Database Based on Bitcask — Always interesting to see another attempt at building a database in Go. This one is inspired by a popular Erlang-based key/value store, Bitcask, has a Redis-like feel, and can be used standalone or even embedded into a Go app.

FlowerCorp

Fx 24.0: A Command-Line JSON Processing Tool — If you’ve got some files full of JSON that you want to process, Fx will slice and dice it however you want. It was recently rewritten in Go from its original JavaScript and now supports writing reducers in JavaScript, Python or Ruby.

Anton Medvedev

FerretDB 0.2: An In-Progress, Go-Powered MongoDB Alternative — MongoDB, you say? Yes. This is an attempt to recreate the essentials of MongoDB in Go so it could work as a drop-in replacement and it uses Postgres as the underlying database engine.

FerretDB

rqlite 7.4.0: A Distributed Relational Database Built on SQLite — 7.4.0 adds support for restoring a node from an actual SQLite file rather than an SQL dump.

rqlite

sh 3.5: A Shell Code Parser, Formatter, and Interpreter — Supporting sh, bash, and Korn formats.

Daniel Martí

OctoSQL: Join, Analyze, and Transform Data From Multiple Sources using SQL — Supported sources are CSV, JSON, MySQL, PostgreSQL, Redis and, as of this week, Parquet.

Jacob Martin

Weron: Create Overlay Networks Based on WebRTC
Felicitas Pojtinger