Deep-Dive · · 26 min

Hooking into the Go Toolchain

Note This post was originally published on Internals for Interns on 2026-10-05, as a guest post in Jesús Espino’s series on Go internals. This is a mirror on my personal blog. If you want to share it, please link the original post. Today we’re going to take a look at the Go toolchain, and more specifically at how we can take part in the compilation process with our own code. We won’t patch the compiler. We’ll stand right next to it while it works, watch what it does, and every now and then hand it something it didn’t ask for. Think of it as photobombing the compiler, politely. 📸 ...

October 1, 2026 · 26 min · 5479 words · Kemal Akkoyun
Unleashing the Go Toolchain
Talks · · 1 min

talk: Unleashing the Go Toolchain

The -toolexec flag hides a super-power in the Go toolchain: it lets you turn every go build into a programmable pipeline. In this session we’ll reveal how a simple wrapper command can inject custom analysis, code generation, and instrumentation—without changing a line of application code. You’ll see how platform and tooling teams use -toolexec to weave organisation-wide practices directly into the build, from enforcing error-handling standards to automatically adding observability hooks. We’ll map the journey from a “hello-world” wrapper to full Aspect-Oriented compile-time transformations, and discuss the trade-offs that come with this new power. ...

August 14, 2025 · 1 min · 187 words · Kemal Akkoyun