Golang Weekly - Go toolchain changes in Go 1.21+

Plus talking to Matt Boyle about DDD, Ebitengine turns 10, and building traffic lights and fractals with Go. |

#​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

Together with  Ardan Labs

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

Matthew Boyle is an experienced technical leader in the field of distributed systems, specializing in using Go.

Currently an engineering manager at Cloudflare, but with enterprise and startup experience alike, he's the author of Domain-Driven Design with Go (published by Packt and also available from Amazon).

Can you sell Domain-Driven Design to us in a single paragraph?

Domain-Driven Design (DDD) is about ensuring your software matches the real-world problem space you’re designing for. This is powerful as it enables clearer communication with both technical and non-technical colleagues, typically leads to faster software development cycles and makes your software less brittle; meaning you can adapt it to new requirements.

What advice would you give to developers who are new to DDD and want to start incorporating it into their projects?

If there's one thing you take away from my book, it’s that DDD does not need to be "all or nothing" and you can be pragmatic about it. DDD promotes something called “ubiquitous language” which suggests that when specific words are used by your team, there should be no doubt about what they mean. An example of this is the term "user". If I ask marketing what a user is and an engineer what a user is, will they give the same answer?

By creating and publishing a definition for terms such as this that our team agrees on, we can ensure we're aligned. It also will make our code more robust as when we use the term "user", everyone will know exactly what we mean.

Can you share anything about the process of adopting DDD concepts, traditionally associated with OOP, to a more idiomatically Go approach?

I found a lot of the patterns translate fairly easily. For example, adapter patterns and the Open Host Service. Some things like the factory pattern tend to be less widely used in Go. In my book, I did my best to explain each pattern and call out the trade offs that are being made to make it work but I’m certainly open to challenge on it so please get in touch if you think I got it wrong!

In a recent post about writing the book, you expressed apprehension about taking on the responsibility of writing a book. Now it's done, how does it feel?

I had always wanted to write a book and will always be grateful for the opportunity to do so. It has also given me more opportunities since, such as this interview or appearing on the Go Time podcast and enabled me to engage more with folks in the Go community I look up to such as Mat Ryer, Jon Calhoun and Bill Kennedy.

Writing the book is one of the best things I have ever done professionally and I'd encourage others to give it a go!

Matt has been writing Go for production since 2018 and often shares blog posts and fun trivia about Go over on Twitter (@MattJamesBoyle).

ƛ And one for fun..

A Fast Mandelbrot Set Renderer using Goroutines — A little off the usually trodden path but the output looks fantastic, and it’s a cool demonstration of bringing together some math, image creation, and concurrency.

Jonas Weich

Jobs

Join the Gno.land Team — Get to gno us! Sign up for a Q&A with our team to learn about joining Gno.land and building the next-gen smart contract platform.
Gno.land

Find a Job Through Hired — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.
Hired

n

Older messages

Go's on IBM mainframes now

Monday, June 12, 2023

Plus a natural language date/time parser, a new HTTP request router, and a way to visualize git contributions locally. | #​463 — June 6, 2023 Unsub | Web Version Together with Courier logo Go Weekly

Let's build a distributed K/V store in Go

Tuesday, May 30, 2023

Plus PayPal's Go-powered database, a fluent HTTP client library, and Mario makes an appearance. | #​462 — May 30, 2023 Unsub | Web Version Together with Ardan Labs Go Weekly Implementing a

1 million concurrent tasks

Tuesday, May 23, 2023

Plus Google drops SimHospital on us, lots of data structures, and a C to WASM to Go odyssey. | #​461 — May 23, 2023 Unsub | Web Version Together with Courier logo Go Weekly How to Start a Go Project in

The latest Go survey results

Tuesday, May 16, 2023

Plus Go-powered robots, parsing Go with regular expressions, and a big serving of Barf. | #​460 — May 16, 2023 Unsub | Web Version Together with Ardan Labs Go Weekly The Go Developer Survey 2023 Q1

A modest proposal?

Tuesday, May 9, 2023

Plus Go 1.20.4, a way to visualize call graphs, Go GUI bindings, and a pure Go machine learning library. | #​459 — May 9, 2023 Unsub | Web Version Together with Teleport logo Go Weekly go-callvis:

You Might Also Like

Sunday Digest | Featuring 'The World’s 20 Largest Economies, by GDP (PPP)' 📊

Sunday, December 22, 2024

Every visualization published this week, in one place. Dec 22, 2024 | View Online | Subscribe | VC+ | Download Our App Hello, welcome to your Sunday Digest. This week, we visualized public debt by

Android Weekly #654 🤖

Sunday, December 22, 2024

View in web browser 654 December 22nd, 2024 Articles & Tutorials Sponsored Solving ANRs with OpenTelemetry While OpenTelemetry is the new observability standard, it lacks official support for many

😸 Our interview with Amjad Masad

Sunday, December 22, 2024

Welcome back, builders Product Hunt Sunday, Dec 22 The Roundup This newsletter was brought to you by AssemblyAI Welcome back, builders Happy Sunday! We've got a special edition of the Roundup this

C#537 Automating Santa's Workshop with NServiceBus

Sunday, December 22, 2024

Using event-driven architecture for effective gift delivery 🎄🎁 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Race for AI Reasoning is Challenging our Imagination

Sunday, December 22, 2024

New reasoning models from Google and OpenAI ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

ScienceDaily/Minimalist lamp/Avocado tip

Sunday, December 22, 2024

Recomendo - issue #442 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Laravel VS Code Extension, Laravel 11.36, Wirechat, and more! - №544

Sunday, December 22, 2024

Your Laravel week in review ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Kotlin Weekly #438

Sunday, December 22, 2024

ISSUE #438 22nd of December 2024 Announcements klibs.io JetBrains has introduced the alpha version of klibs.io – a web service that speeds up and simplifies discovering KMP libraries that best meet

Weekend Reading — Happy "That's a January Problem" week

Saturday, December 21, 2024

Can Christmas season start a little earlier this year Tech Stuff Ramsey Nasser fuck it happened i am in a situation where i do actually need to reverse a linked list Atuin I just learned about Atuin

Daily Coding Problem: Problem #1644 [Easy]

Saturday, December 21, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by IBM. Given an integer, find the next permutation of it in absolute order. For example,