Go toolchain changes in Go 1.21+

#​464 — June 13, 2023

Unsub  |  Web Version

✍️ If you're intrigued about domain-driven design (DDD), we've got an interview with Matt Boyle, the author of Domain-Driven Design with Go – it's at the end of today's issue.
__
Your editor, Peter Cooper

Go Weekly

An Update on Go Toolchains — Russ Cox noted that “many people believe the go line in the go.mod file specifies which Go toolchain to use.” Not so.. but from Go 1.21 the go command will use its own bundled toolchain if that toolchain is at least as new as the go or toolchain lines in the module/workspace. If the toolchain is outdated, the newer version will be obtained. The official docs have been significantly extended to explain the situation.

Official Go Site

🎉  Ebitengine's Game Jam to Celebrate Its 10th Birthday — Beginning this Thursday, this game jam is a two-week event encouraging participants to build games with Go's popular Ebitengine 2D game library. Formerly known as Ebiten, Ebitengine has turned 10 years old and supports a variety of platforms including the Nintendo Switch.

Siôn le Roux and Hajime Hoshi

Go! Experts at Your Service — Do you need help filling skill gaps, speeding up development & creating high performing software with Go, Docker, K8s, Terraform and Rust? We’ll help you maximize your architecture, structure, tech-debt and human capital.

Ardan Labs Consulting sponsor

Writing a Go Fuzz Target — The third in a four-part series on random and fuzz-testing. John breaks down a simple, but complete, fuzz test to show the right way to do things, in this case to surface a common kind of Go bug: accidentally mixing up bytes with runes.

John Arundel (Bitfield Consulting)

Caching Go Tests in CI — As the number of tests in their monorepo increased, this team’s test-related CI workflows got slower and slower, but Go’s test caching features helped turn things around getting times down from minutes to seconds in many cases.

Benjamin Yolken

Using Pointers to Reduce Copies is Premature Optimization? — Is using pointers to avoid values being copied onto the stack always a win when dealing with large amounts of data? It’s another “it depends” situation, but it’s not something you should immediately reach for as a default.

Dan the Individual

IN BRIEF:

  • Go 1.20.5 and 1.19.10 were released including three security fixes.

  • Should Go have a built-in zero function to get the zero value of a type? (e.g. "" for strings, false for booleans, 0 for numeric types..) No-one seems very convinced so far.

Scrubbing Sensitive Data at 180MB/Sec/Core — To protect sensitive data, Encore implemented a streaming ‘scrubber’ for JSON data that uses static analysis to determine which fields need to be scrubbed. Their approach is fast even “without any serious optimization effort put in.”

Dominic Black (Encore)

Raspberry Pi Coding in Go: Traffic Lights — As you might expect, this is more about setup and cross-compiling (plus you need some actual lights), but working with Raspberry Pis is always interesting and Go is a reasonable fit here.

Simon Prickett

Troubleshooting Kubernetes Networking Issues — First of a series of blogs on the most common failures we've encountered with Kubernetes across a variety of deployments.

Teleport | goteleport.com sponsor

Process Huge Log Files with Go vs Python — With several gigabytes of logs to process and with Python taking a long time to do it, Madhur gave Go a try and came away pleasantly surprised with the performance difference.

Madhur Ahuja

🛠 Code & Tools

Geziyor: A Web Crawling and Scraping Framework — Boasts being able to crawl at many thousands requests per second and offers JavaScript rendering, caching, concurrency limits, automatic data exporting, proxy management, and more.

Musab Gültekin

Compress: Optimized Compression Packages — Covers a variety of compression standards like zstandard, S2, gzip, snappy, and zip.

Klaus Post

gotestsum 1.10: go test Runner with Optimized Output and Summaries — Adds some niceties over the top of go test with a ‘watch’ mode to re-run tests when files are updated, the ability to run a command after a run (perhaps for an OS notification), and more human friendly test output along with a summary of each run.

Daniel Nephin et al.

Temporal 101 & 102 Courses in Go — Learn Temporal's open source key concepts and best practices with our free self-paced training courses in Go!

Temporal Technologies sponsor

A Repo to Use for Go Interview Prep — Getting ready to apply for a Go position? Matt Boyle has built this repo for you to practice on: “It’s a simple CRUD application but it has lots of smelly code, some security issues and poor design choices. Can you spot them all?”

Matt Boyle

💡 We also feature an interview with Matt on domain driven design, below.

Rapid 1.0: Property-Based Testing Library — Checks that properties you define hold for a large number of automatically generated test cases. If a failure is found, Rapid automatically minimizes the failing test case before presenting it.

Gregory Petrosyan

Spectagular: Spectacular Struct Tag Parsing“In general it’s not very often you need to parse struct tags, but if you do this library is designed to help by automatically converting struct tags to their expected value as well as cache/validate said values.”

Matthew Abrego

Created 2y | Jun 13, 2023, 1:21:22 PM


Login to add comment