Skip to content

Commit 447f458

Browse files
dmitshurgopherbot
authored andcommitted
context: delete lone example
This is motivated by a few reasons. One, the upstream package has more examples, and no one should be looking at this old package to learn how to use it. Seeing an example might make it seem like the scope of the documentation here is to provide examples, and that there aren't many of them. Instead of trying to add more examples or maintain the current one by porting the de-flake enhancement from CL 460999, delete the only example here. Second, running 'go fix ./...' causes the 'context' fix to rewrite the import path of the example from "golang.org/x/net/context" to "context". That is a false positive in the fix, and I would've liked it fix the fix, but it only has the AST information at this time, not type info, so the import path isn't currently available to the check. That means it can't know when it's running on the golang.org/x/net/context package, which is the one place it should skip the rewrite. It seems simpler to just delete the example, and then it becomes possible to use 'go fix ./...' safely on the entire x/net module. For golang/go#49506. Change-Id: I97eba33ca2e1f2960aef8340d8b561639a26ee48 Reviewed-on: https://go-review.googlesource.com/c/net/+/650156 Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 918d64e commit 447f458

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

Diff for: context/withtimeout_test.go

-31
This file was deleted.

0 commit comments

Comments
 (0)