The Applied Go Weekly Newsletter logo

The Applied Go Weekly Newsletter

Archives
February 15, 2026

If It Ain't Broken, Go Fix It! • The Applied Go Weekly Newsletter 2026-02-15

AppliedGoNewsletterHeader640.png

Your weekly source of Go news, tips, and projects

2026-02-15-if-it-aint-broken-go-fix-it.png

If It Ain't Broken, Go Fix It!

Hi ,

The new go fix command of Go 1.26 should have really been named go polish or go beef-it-up.

What go fix, you ask? Well, yeah, go fix isn't exactly the most popular tool in the Go toolchain. In the early days of Go, it served for fixing Go code when a new release changed library APIs. But Go turned out to be so backward-compatible that such fixes aren't really necessary, and go fix became as irrelevant as a tool can become.

The Go team pulled the plug on the old go fix by reinventing it from the ground up. Now it acts similar to go vet: It has a list of static analyzers that detect outdated language constructs and auto-updates them to their modern counterpart. I tried go fix on a few repos, and it reliably modernized old-fashioned code.

For example, it found an occasion for using the quite new min() function.

Old code:

upper := 3
if len(dirs) < 3 {
    upper = len(dirs)
}

New code:

upper := min(len(dirs), 3)

It turned an old-fashioned

for i := 0; i < 100; i++ {

into

for i := range 100 {

and turned a Split() into SplitSeq() and a HasPrefix()/TrimPrefix() combo into CutPrefix().

Before:

for _, line := range strings.Split(head, "\n") {
    line = strings.TrimSpace(line)
    if strings.HasPrefix(line, key+":") {
        return strings.TrimSpace(strings.Trim(strings.TrimPrefix(line, key+":"), " \""))

After:

for line := range strings.SplitSeq(head, "\n") {
    line = strings.TrimSpace(line)
    if after, ok := strings.CutPrefix(line, key+":"); ok {
        return strings.TrimSpace(strings.Trim(after, " \""))

Here is the full list of current analyzers:

Analyzer Description
any replace interface{} with any
buildtag check //go:build and // +build directives
fmtappendf replace []byte(fmt.Sprintf) with fmt.Appendf
forvar remove redundant re-declaration of loop variables
hostport check format of addresses passed to net.Dial
inline apply fixes based on 'go:fix inline' comment directives
mapsloop replace explicit loops over maps with calls to maps package
minmax replace if/else statements with calls to min or max
newexpr simplify code by using go1.26's new(expr)
omitzero suggest replacing omitempty with omitzero for struct fields
plusbuild remove obsolete //+build comments
rangeint replace 3-clause for loops with for-range over integers
reflecttypefor replace reflect.TypeOf(x) with TypeFor[T]()
slicescontains replace loops with slices.Contains or slices.ContainsFunc
slicessort replace sort.Slice with slices.Sort for basic types
stditerators use iterators instead of Len/At-style APIs
stringsbuilder replace += with strings.Builder
stringscut replace strings.Index etc. with strings.Cut
stringscutprefix replace HasPrefix/TrimPrefix with CutPrefix
stringsseq replace ranging over Split/Fields with SplitSeq/FieldsSeq
testingcontext replace context.WithCancel with t.Context in tests
waitgroup replace wg.Add(1)/go/wg.Done() with wg.Go

(From go tool fix help.)

While go fix uses the same architecture as go vet, the analyzers are different (take a look at go tool vet help for comparison). So go fix is not a go vet plus auto-apply. Rather, go fix handles specific cases that can be "fixed" (that is, modernized) right away, while go vet only suggests possible changes but leaves it to the user to review, assess, and apply or ignore a suggestion.

If you want to learn more, Go feature: Modernized go fix showcases each of the above analyzers. (The article came out during this newsletter's winter break, but I'm happily linking to it now.) The Go team also announced upcoming blog articles about details of Go 1.26's changes and additions, and I expect one about go fix among them. Stay tuned.

–Christoph

Featured articles

Go 1.26 is released - The Go Programming Language

Imagine your code becoming faster (GC, CGO, stack allocs), modernized (go fix), more generic (generic types refering to themselves), more robust and secure (testing/cryptotest, runtime/secret (E), goroutineleak profile (E)), and fit for single instruction, multiple data (SIMD) operations (simd/archismd (E)). ((E) denotes experimental additions that require explicit enabling.)

Imagine Go 1.26. Well, no need to imagine anymore; it's out now.

The Bootstrap | Internals for Interns

The first thing that a Go binary does when starting is invoking main. Or does it? Jesús Espino takes out the maginfying glass and takes you through the many steps that happen before the code inside main() is even touched.

[New Livestream] Go 1.26 Release Party | The GoLand Blog

JetBrains, makers of the GoLand IDE, will celebrate Go 1.26 in a livestream. Guests are Anton Zhiyanov and Alex Rios. Save the date:

Date: February 19, 2026

Time: 4:00 – 5:30 pm UTC

Podcast corner

go podcast() | 072: The tools we're using as Go SWE

Dominic and Morten talk about the developer tools they use and love, from Podman and Caddy to OpenCode and MailPit.

Cup o' Go | Dancing elephants and upgraded Elves

It's all about Go 1.26—not! Besides the obvious news, Shay and Jonathan talk about the Stuttgart meetup, how Go helped an ex-front-end developer find new joy in development, whether AI-generated CLs should be taken seriously, and more.

Quote of the Week: Why do you ever need a framework?

Why do you ever need, for most of the use cases you can think of, a useless, expensive, flawed, often vulnerable framework, and the parade of libraries that comes with it, that you probably use for only 10% of its capabilities?

– Alain Di Chiappari

More articles, videos, talks

Go’s synctest is amazing | Oblique

"We threw Go’s new “testing/synctest” package at a particularly gnarly part of our codebase and were pleasantly surprised by how effective it was."

A JSON schema package for Go

Incoming JSON can be anything. JSON with a schema is legally and morally obliged to follow that schema. The new jsonschema-go package by Google for JSON schema resolution, validation, and inference.

Why has JSON schema become popular lately (rather than years ago)? It's LLMs again. These nasty robots aren't quite known for reliably producing expected JSON structures. A JSON schema helps the LLM know what JSON to produce and the client validate the returned JSON.

Distributing Go binaries like sqlite-scanner through PyPI using go-to-wheel

Why on earth would anybody want to use a Python package managment tool to install Go binaries? I mean, there's goreleaser, Homebrew and Chocolatey, right?

But Simon Willison got a point: "Python is really good at running subprocesses so this opens up a whole world of useful tricks that we can bake into our Python tools."

Smart.

Stepping out of Front-End with Go

How a front-end developer bored out so much that he switched to Go.

Projects

Libraries

GitHub - ValkDB/postgresparser: ANTLR-based PostgreSQL query parser for Go. Extracts tables, columns, joins, CTEs, parameters, DDL actions, and full column-usage metadata from SQL into a structured IR.

This PostgreSQL parser is so lacking. It lacks: unwieldy CGO, shaky regexps, wobbly tools calling, and slow string parsing.

Instead, it has an ANTLR4-based parser. That's it. Solid, easy, fast.

GitHub - aalpar/wile: Embeddable R7RS Scheme interpreter for Go — bytecode compiler, stack VM, hygienic macros

When you want to embed a scripting language in Go, you have plenty of options: Lua, Risor, JavaScript, and many more.

But what if you want a scripting language with macros? No joy—that is, until now. Meet Wile.

Tools and applications

Enhance—A Blazingly Fast Terminal UI for GitHub Actions

Manage your GitHub actions in the terminal: Enhance, a TUI for GH Actions and a companion to the Dash TUI for GitHub, has been made open source.

Fadilix (Fadilou MOROU) · GitHub

What stops you from using your terminal more often? Oh, you're slow at typing? Well, no more excuses: couik, the typing speed test app, lets you practice typing directly in your terminal.

GitHub - ak4-sh/rahu: A python LSP written in go

This language server is currently an "academic exercise" but with plans to turn it into a fully-featured alternative to Node-based Python LSPs.

GitHub - itsManjeet/avyos: experimental OS built purely* in Go.

AvyOS isn't entirely new, but the author recently removed any remaining GNU components to get a pure Go Linux userspace. Kudos for this project.

goscan

Picking a Go library module shouldn't be solely based on a module's popularity, but other aspects being equal, popularity indicates (a bit, at least) how likely a project will still be there in a year or two.

Completely unrelated to Go

Using an engineering notebook | nicole@web

Keep an engineering notebook! A physical one, with a pen. (E-ink variants are fine.) If you're like Nicole, you'll find that you remember things better and start thinking more clearly.

On the flip side, if you totally forget things all the time, and if clear thinking avoids you like the plague, you can blame it on not using an engineering notebook.

Humanity's last programming language - Xe Iaso

Or: When a new technology becomes a blessing and a curse at the same time.

Software Engineering is back - by Alain

The author dislikes frameworks as much as a large part of the Go community does. Does he know that Go is another way of waving frameworks goodbye?

Happy coding! ʕ◔ϖ◔ʔ

Questions or feedback? Drop me a line. I'd love to hear from you.

Best from Munich, Christoph

Not a subscriber yet?

If you read this newsletter issue online, or if someone forwarded the newsletter to you, subscribe for regular updates to get every new issue earlier than the online version, and more reliable than an occasional forwarding. 

Find the subscription form at the end of this page.

How I can help

If you're looking for more useful content around Go, here are some ways I can help you become a better Gopher (or a Gopher at all):

On AppliedGo.net, I blog about Go projects, algorithms and data structures in Go, and other fun stuff.

Or visit the AppliedGo.com blog and learn about language specifics, Go updates, and programming-related stuff. 

My AppliedGo YouTube channel hosts quick tip and crash course videos that help you get more productive and creative with Go.

Enroll in my Go course for developers that stands out for its intense use of animated graphics for explaining abstract concepts in an intuitive way. Numerous short and concise lectures allow you to schedule your learning flow as you like.

Check it out.


Christoph Berger IT Products and Services
Dachauer Straße 29
Bergkirchen
Germany

Don't miss what's next. Subscribe to The Applied Go Weekly Newsletter:
Share this email:
Share on Twitter Share on LinkedIn Share on Hacker News Share on Reddit Share via email Share on Mastodon Share on Bluesky
https://c.im/@c...
LinkedIn
Powered by Buttondown, the easiest way to start and grow your newsletter.