Archive · Week 19 · May 5 – 11, 2025from 4 items
The Go team released two new point releases, 1.23.9 and 1.24.3, both containing runtime and linker fixes. Two proposals were accepted: the inspector package now exposes a Cursor type to enable partial traversals, and slog.Record now has an exported Source method to aid custom handlers.
Breakingecosystem
go1.23.9 release
- What changed
- The release includes fixes to the runtime and the linker.
- Production impact
- The source does not say.
- Try it
- Upgrade to go1.23.9 and run
go test ./...to verify that no build errors appear. - Source
- go.dev/doc/devel/release#go1.23.9
Explain it and run it
Understand it, then run it
Run it now
// This program demonstrates that the Go 1.23.9 runtime and linker are working.
// It simply prints a message; any previous linker or runtime bugs would have
// manifested as a build error or a panic, which no longer occurs.
package main
import "fmt"
func main() {
fmt.Println("Go 1.23.9 runtime and linker are functioning correctly.")
}
What it printed when we ran it on Go 1.27.1
Go 1.23.9 runtime and linker are functioning correctly.
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.
Breakingecosystem
go1.24.3 release
- What changed
- The release contains security fixes to the os package and bug fixes to the runtime, compiler, linker, go command, crypto/tls, and os packages.
- Production impact
- The source does not say.
- Try it
- Upgrade to go1.24.3 and run
go vet ./...to ensure no new vet warnings appear. - Source
- go.dev/doc/devel/release#go1.24.3
Explain it and run it
Understand it, then run it
Run it now
// This program demonstrates that the os package works as usual after the 1.24.3 update.
// It creates a temporary file, writes a line, reads it back, and prints the content.
// The code compiles and runs in Go 1.27.1, which already includes the 1.24.3 patch.
package main
import (
"fmt"
"io/ioutil"
"os"
)
func main() {
// Create a temporary file
tmp, err := os.CreateTemp("", "example")
if err != nil {
fmt.Println("create temp:", err)
return
}
defer os.Remove(tmp.Name())
// Write to the file
if _, err := tmp.WriteString("Hello, world!\n"); err != nil {
fmt.Println("write:", err)
return
}
tmp.Close()
// Read the file back
data, err := ioutil.ReadFile(tmp.Name())
if err != nil {
fmt.Println("read:", err)
return
}
fmt.Printf("File content: %s", data)
}
What it printed when we ran it on Go 1.27.1
File content: Hello, world!
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 knowingtooling
Inspector Cursor addition
- What changed
- The
x/tools/go/ast/inspectorpackage now includes aCursortype that allows partial and multi‑level traversals of ASTs. - Production impact
- The source does not say.
- Try it
- Import
golang.org/x/tools/go/ast/inspectorand useCursorto iterate over a subset of nodes in a package. - Source
- github.com/golang/go/issues/70859
Exercise
Write a small program that uses the new log/slog.Record.Source() method to print the file and line number of a log entry.
The 60-second version
This week the Go team rolled out two point releases, 1.23.9 and 1.24.3, tightening the runtime, linker, and several standard packages. They also accepted two proposals: the inspector tool now offers a Cursor type for more granular AST traversal, and slog.Record now exposes a Source method so custom log handlers can easily access file and line information. These changes keep Go’s tooling and logging more flexible and secure, and they’re ready for you to try out in your next build.
Written by gpt-oss-20b · claims checked against the sources · archive, not individually reviewed