Radar · Go · #002 · Week 40 · Sep 28 – Oct 4, 2026
Deprecate `debug/pe.ImportDirectory`
Worth knowingstdlib
- What changed
- The proposal deprecates
debug/pe.ImportDirectory. - Production impact
- The source does not say.
- Try it
- Search your code for uses of
debug/pe.ImportDirectoryand replace or remove them. - Source
- github.com/golang/go/issues/81594
Understand it, then run it
Run it now
package main
import (
"debug/pe"
"fmt"
)
func main() {
// In Go 1.27.1 the type `pe.ImportDirectory` still exists but is marked deprecated.
// This program creates a zero value of that type and prints it to show the API is usable.
var dir pe.ImportDirectory
fmt.Printf("zero ImportDirectory value: %+v\n", dir)
}
What it printed when we ran it on Go 1.27.1
zero ImportDirectory value: {OriginalFirstThunk:0 TimeDateStamp:0 ForwarderChain:0 Name:0 FirstThunk:0 dll:}
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-120b from the linked source · claims checked against the sources · human-reviewed