Proposals Unofficial Go proposal tracker

Mark DNSConfigError as deprecated

#63118 · net · low impact · Implemented in Go 1.28 ·

The net.DNSConfigError type has not been used by the net package for years. Its doc comment says "No longer used; kept for compatibility," but it lacks a formal deprecation notice. As a result, tools like staticcheck and gopls don't warn code that still references it.

The proposal adds a standard Deprecated: comment to the type. The type stays in the package for compatibility, so existing code keeps compiling.

// DNSConfigError represents an error reading the machine's DNS configuration.
//
// Deprecated: No longer used; kept for compatibility.
type DNSConfigError struct {
    Err error
}
Proposal
#63118 by mateusz834
Status
Implemented on Oct 9, 2026
Release
Go 1.28
Impact
low
Area
net