This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Go · Archive · Week 8 · Feb 16 – 22, 2026

Using go fix to modernize Go code

Nice to knowtooling

What changed
Go 1.26 introduces a new implementation of go fix that can help modernize code.
Production impact
The source does not say.
Try it
Run go fix -r on a legacy Go file and observe the suggested changes.
Source
go.dev/blog/gofix

Understand it, then run it

Run it now

Todaygo
// This program demonstrates the newexpr modernizer feature introduced in Go 1.26.
// It uses the new function with an expression argument and prints the result.
package main

import (
	"fmt"
)

func main() {
	// new(10) creates an int variable initialized to 10 and returns its address.
	ptr := new(10)
	fmt.Println(*ptr) // prints 10
}

What it printed when we ran it on Go 1.27.1

10

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed