Skip to content

No-longer necessary to import context package #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

supr
Copy link

@supr supr commented Mar 13, 2019

  • 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.

@apteryks
Copy link

apteryks commented Jun 1, 2025

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants