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

Radar · Go · Archive · Week 37 · Sep 8 – 14, 2025

x/net/context deprecation proposal

Worth knowingtooling

What changed
The Go team has accepted a proposal to mark the golang.org/x/net/context package as deprecated, so linters will emit warnings when it is used.
Production impact
The source does not say.
Try it
Run go vet on a project that imports golang.org/x/net/context and observe the deprecation warning.
Source
github.com/golang/go/issues/49506

Understand it, then run it

Run it now

Todaygo
// This program demonstrates that the standard library's `context` package
// is the correct import to use.  The deprecated `golang.org/x/net/context`
// package is no longer imported, so no deprecation warning is emitted.
// The program prints the concrete type of the background context value.
package main

import (
	"context"
	"fmt"
)

func main() {
	// Obtain the background context from the standard library.
	c := context.Background()
	// Print the concrete type of the context value.
	fmt.Printf("Context type: %T\n", c)
}

What it printed when we ran it on Go 1.27.1

Context type: context.backgroundCtx

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-20b from the linked source · claims checked against the sources · archive, not individually reviewed