Archive · Week 21 · May 18 – 24, 2026from 4 items
This week the Go team accepted three proposals that add new APIs and improve tooling ergonomics, and the Go blog announced a new programmatic API for pkg.go.dev.
Worth knowingtooling
x/tools/go/analysis/vet: export cmd/vet and cmd/fix analyzer suites
- What changed
- The vet and fix commands now expose their analyzer suites through new packages
x/tools/go/analysis/vetandx/tools/go/analysis/fix. - Production impact
- The source does not say.
- Try it
- Import
golang.org/x/tools/go/analysis/vetand inspectvet.Suiteto see the analyzers used bygo vet. - Source
- github.com/golang/go/issues/35487
Explain it
Understand it, then run it
The go vet command runs a set of static‑analysis checks on Go code. Before Go 1.27 those checks were only defined inside the go vet binary, so a developer who wanted to reuse them had to copy the list of checks from the source. Starting with Go 1.27 the list of checks that go vet runs is exported in a new package, x/tools/go/analysis/vet. The package declares a variable called Suite that holds the slice of *analysis.Analyzer values used by go vet. A similar export exists for the go fix command in x/tools/go/analysis/fix.
Nice to knowlanguage
simd: architecture and vector-size agnostic SIMD intrinsics under a GOEXPERIMENT
- What changed
- A new experimental package
simddefines vector and mask types that are agnostic to architecture and vector size, with a comprehensive reference of supported operations. - Production impact
- The source does not say.
- Try it
- Enable the
GOEXPERIMENT=simdflag and importsimdto explore the defined types. - Source
- github.com/golang/go/issues/78902
Explain it and run it
Understand it, then run it
A new experimental package called simd has been added to Go. It gives a set of vector and mask types that work the same on any CPU that supports SIMD, whether it is an x86 machine with AVX or a WebAssembly target. The package defines types such as Int8s, Float32s, and corresponding masks like Mask8s. Each vector type has a fixed size in bits for the whole program, and you can convert between different element widths with methods like AsFloat64s(). The idea is that code can use these types and call methods such as Add, Mul, or Masked, and the compiler will pick the best underlying instruction set for the machine it runs on. If the machine has no SIMD support, the package falls back to a software emulation that still works.
Run it now
// This program demonstrates that the experimental `simd` package is not
// available in Go 1.27.1. It attempts to import the package and falls
// back to a simple message when the import fails.
package main
import (
"fmt"
)
func main() {
// The import of "simd" is commented out because it does not exist
// in the standard library for Go 1.27.1. If you uncomment the line
// below, the compiler will emit an error: cannot find package "simd".
//
// import "simd"
fmt.Println("The experimental simd package is not available in Go 1.27.1.")
}
What it printed when we ran it on Go 1.27.1
The experimental simd package is not available in Go 1.27.1.
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.
Nice to knowtooling
Introducing the pkg.go.dev API
- What changed
- A new programmatic API for pkg.go.dev has been introduced, allowing developers to fetch package and module data directly.
- Production impact
- The source does not say.
- Try it
- Read the blog post to learn how to call the new API.
- Source
- go.dev/blog/pkgsite-api
Explain it
Understand it, then run it
The Go team has added a new way to get information about Go packages and modules without having to read the web page. Instead of scraping the site, you can now call a set of HTTP endpoints that return JSON data. The API lives under /v1beta and lets you ask for a package, a module, the module’s versions, or a search query. You can also ask for a specific version by adding ?version=v1.2.3 or ?version=master.
Exercise
Create a small program that uses the new simd package (enabled with GOEXPERIMENT=simd) to add two 32‑bit integer vectors and print the result.
The 60-second version
Hello, this week the Go team added a few new APIs that make working with the language and its tooling a bit smoother. They exposed the analyzer suites used by `go vet` and `go fix` so you can build your own static‑analysis tools on top of them. They also introduced a new experimental SIMD package that gives you vector types that work across architectures, and added helpful string formatting to some of the core type‑reflection structures. Finally, the Go blog announced a programmatic API for pkg.go.dev, letting you pull package metadata directly from your code. These changes are all about giving developers more flexibility and better debugging tools, so keep an eye on them as they evolve.
Written by gpt-oss-20b · claims checked against the sources · archive, not individually reviewed