go-context
go-context copied to clipboard
No-longer necessary to import context package
- Since go 1.9 there is no need for importing context package from golang.org/x/net/context.
- With this PR the context package from the stdlib should work.
- calls the cancel functions for contexts in the test package.
As part of an internal package, there is a dependency on the jbenet/go-context package, along with a necessity of not being able to import golang.org/x/net/context package, since it is already available in the standard library.
@jbenet please review and advise.
That's now required with a recent Go, as seen when attempting to use godef for example:
$ /gnu/store/hjnfnay8m7iwmfyvdjyw7b79wldjvmgc-godef-1.1.2-0.dbdb472/bin/godef -f main.go "main()"
2025/06/01 20:16:19 internal error: package "golang.org/x/net/context" without types was imported from "github.com/jbenet/go-context/io"