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

Quiet Pager · Radar

What changed in Go, Rust and Solidity this week.

What changed this week, from each project's own release notes, proposals and issues, with an exercise you can run for each change.

Written by a model · reviewed by a person · published Mondays · Atom feed

Archive · Week 18 · Apr 27 – May 3, 2026from 2 items

The Go team accepted two proposals that extend the analysis framework and the SQL driver interface. Both changes add new APIs that can be used by tooling and drivers to improve safety and flexibility.

Worth knowingtooling

x/tools/go/analysis/passes/modernize analyzers

What changed
The proposal adds several new analyzers to the modernize pass: atomic, embedlit, errorsastype, plusbuild, stringscut, and stditerators.
Production impact
The source does not say.
Try it
Run go vet -vettool=$(go env GOROOT)/bin/govet with the modernize pass and observe the new diagnostics.
Source
github.com/golang/go/issues/77986
Explain it and run it

Understand it, then run it

Run it now

Todaygo
// This program demonstrates the new modernize analyzers.
// It intentionally uses patterns that the analyzers will flag.
// Running `go vet -vettool=$(go env GOROOT)/pkg/tool/linux_amd64/vet`
// will show suggestions for atomic, embedlit, errorsastype,
// plusbuild, stringscut, and stditerators.

package main

import (
	"errors"
	"fmt"
	"sync/atomic"
)

// atomic example: old sync/atomic usage
var counter int32

func inc() {
	atomic.AddInt32(&counter, 1) // modernize will suggest atomic.Int32
}

// embedlit example: embedding a string literal
type Config struct {
	Data string // modernize will suggest go:embed
}

// errorsastype example: converting error to any
func errToAny(err error) any {
	return err // modernize will suggest errors.As
}

// plusbuild example: old build tag syntax
// +build ignore

// stringscut example: trimming a string
func trim(s string) string {
	return s[:len(s)-1] // modernize will suggest strings.TrimSpace
}

// stditerators example: inefficient range loop
func sum(nums []int) int {
	total := 0
	for i := 0; i < len(nums); i++ { // modernize will suggest range
		total += nums[i]
	}
	return total
}

func main() {
	inc()
	fmt.Println("counter:", counter)
	c := Config{Data: "example"}
	fmt.Println(c.Data)
	err := errors.New("oops")
	fmt.Println(errToAny(err))
	fmt.Println(trim("hello "))
	fmt.Println(sum([]int{1, 2, 3}))
}

What it printed when we ran it on Go 1.27.1

counter: 1
example
oops
hello
6

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.

Worth knowingstdlib

database/sql/driver: allow driver to entirely override Scan

What changed
The proposal introduces sql.ConvertAssign and a new driver.RowsColumnScanner interface that lets drivers scan directly into user‑provided destinations.
Production impact
The source does not say.
Try it
Implement a minimal driver that uses RowsColumnScanner to scan a column into a custom type and observe the behavior.
Source
github.com/golang/go/issues/67546

Exercise

Write a small program that uses the new sql.ConvertAssign function to copy a driver.Value into a custom struct field.

The 60-second version

This week the Go team added new tools and APIs that help developers write safer and more flexible code. First, the analysis framework now includes several new analyzers—atomic, embedlit, errorsastype, plusbuild, stringscut, and stditerators—so that static analysis can catch more subtle bugs and suggest modern idioms. Second, the database/sql package now exposes a ConvertAssign helper and a new RowsColumnScanner interface, allowing drivers to scan data directly into custom destination types. These changes give both tooling and drivers more power to enforce correctness and improve ergonomics, while keeping the core language unchanged.

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