{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/18182","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18182/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18182/comments","events_url":"https://api.github.com/repos/golang/go/issues/18182/events","html_url":"https://github.com/golang/go/issues/18182","id":193257451,"number":18182,"title":"Proposal: add `context.Context` objects to `testing.T`","user":{"login":"Lucretiel","id":1823405,"avatar_url":"https://avatars.githubusercontent.com/u/1823405?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucretiel","html_url":"https://github.com/Lucretiel","followers_url":"https://api.github.com/users/Lucretiel/followers","following_url":"https://api.github.com/users/Lucretiel/following{/other_user}","gists_url":"https://api.github.com/users/Lucretiel/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucretiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucretiel/subscriptions","organizations_url":"https://api.github.com/users/Lucretiel/orgs","repos_url":"https://api.github.com/users/Lucretiel/repos","events_url":"https://api.github.com/users/Lucretiel/events{/privacy}","received_events_url":"https://api.github.com/users/Lucretiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-03T01:52:22Z","updated_at":"2016-12-03T01:57:28Z","closed_at":null,"body":"Proposal: add a test-local `Context` object to `testing.T` objects. The object would be accessible like this:\r\n\r\n    func TestSomething(t *testing.T) {\r\n        ctx = t.Context()\r\n        ...\r\n    }\r\n\r\nIt would be cancelled at the end of the test. This would allow tests involving network calls, parallel goroutines, or other blocking code to use the context to cancel all the background stuff in the event the test fails an assertion early with `FailNow` or something similar.\r\n\r\nIt should be a fairly straightforward feature, so if there's interest I can create a Pull Request when I have time."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/264607310","html_url":"https://github.com/golang/go/issues/18182#issuecomment-264607310","issue_url":"https://api.github.com/repos/golang/go/issues/18182","id":264607310,"user":{"login":"minux","id":135652,"avatar_url":"https://avatars.githubusercontent.com/u/135652?v=3","gravatar_id":"","url":"https://api.github.com/users/minux","html_url":"https://github.com/minux","followers_url":"https://api.github.com/users/minux/followers","following_url":"https://api.github.com/users/minux/following{/other_user}","gists_url":"https://api.github.com/users/minux/gists{/gist_id}","starred_url":"https://api.github.com/users/minux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minux/subscriptions","organizations_url":"https://api.github.com/users/minux/orgs","repos_url":"https://api.github.com/users/minux/repos","events_url":"https://api.github.com/users/minux/events{/privacy}","received_events_url":"https://api.github.com/users/minux/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T01:57:28Z","updated_at":"2016-12-03T01:57:28Z","body":"I think this has already been done, no?\n\nhttps://tip.golang.org/pkg/testing/#T.Context\n"}}
{"actor":{"display_login":"minux"}}