{"action":"created","comment":{"url":"https://api.github.com/repos/gin-gonic/gin/pulls/comments/240584959","pull_request_review_id":183644659,"id":240584959,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDU4NDk1OQ==","diff_hunk":"@@ -7,11 +7,14 @@\n package gin\n \n import (\n+\t\"bytes\"\n \t\"net/http\"\n \t\"net/http/httptest\"\n \t\"testing\"\n+\t\"time\"\n \n \t\"github.com/stretchr/testify/assert\"\n+\t\"golang.org/x/net/context\"","path":"context_17_test.go","position":11,"original_position":11,"commit_id":"db8e64d84babf96c387d388c1926bad93618c1ea","original_commit_id":"db8e64d84babf96c387d388c1926bad93618c1ea","user":{"login":"thinkerou","id":4488261,"node_id":"MDQ6VXNlcjQ0ODgyNjE=","avatar_url":"https://avatars2.githubusercontent.com/u/4488261?v=4","gravatar_id":"","url":"https://api.github.com/users/thinkerou","html_url":"https://github.com/thinkerou","followers_url":"https://api.github.com/users/thinkerou/followers","following_url":"https://api.github.com/users/thinkerou/following{/other_user}","gists_url":"https://api.github.com/users/thinkerou/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkerou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkerou/subscriptions","organizations_url":"https://api.github.com/users/thinkerou/orgs","repos_url":"https://api.github.com/users/thinkerou/repos","events_url":"https://api.github.com/users/thinkerou/events{/privacy}","received_events_url":"https://api.github.com/users/thinkerou/received_events","type":"User","site_admin":false},"body":"why not use `context`?","created_at":"2018-12-11T12:12:44Z","updated_at":"2018-12-11T12:12:44Z","html_url":"https://github.com/gin-gonic/gin/pull/1690#discussion_r240584959","pull_request_url":"https://api.github.com/repos/gin-gonic/gin/pulls/1690","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/comments/240584959"},"html":{"href":"https://github.com/gin-gonic/gin/pull/1690#discussion_r240584959"},"pull_request":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/1690"}}},"pull_request":{"url":"https://api.github.com/repos/gin-gonic/gin/pulls/1690","id":237418715,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NDE4NzE1","html_url":"https://github.com/gin-gonic/gin/pull/1690","diff_url":"https://github.com/gin-gonic/gin/pull/1690.diff","patch_url":"https://github.com/gin-gonic/gin/pull/1690.patch","issue_url":"https://api.github.com/repos/gin-gonic/gin/issues/1690","number":1690,"state":"open","locked":false,"title":"context: inherits context cancelation and deadline from http.Request context for Go>=1.7","user":{"login":"rbeuque74","id":556072,"node_id":"MDQ6VXNlcjU1NjA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/556072?v=4","gravatar_id":"","url":"https://api.github.com/users/rbeuque74","html_url":"https://github.com/rbeuque74","followers_url":"https://api.github.com/users/rbeuque74/followers","following_url":"https://api.github.com/users/rbeuque74/following{/other_user}","gists_url":"https://api.github.com/users/rbeuque74/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeuque74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeuque74/subscriptions","organizations_url":"https://api.github.com/users/rbeuque74/orgs","repos_url":"https://api.github.com/users/rbeuque74/repos","events_url":"https://api.github.com/users/rbeuque74/events{/privacy}","received_events_url":"https://api.github.com/users/rbeuque74/received_events","type":"User","site_admin":false},"body":"*gin.Context implements standard context.Context methods, but always\r\nreturns data as context is still valid. Since Go 1.7, http.Request now\r\ncontains a context.Context object, which can be controlled by the\r\nhttp.Server to indicates that the context is now closed, and persue of\r\nrequest should be canceled.\r\n\r\nThis implements the propagation of http.Request context methods inside\r\ngin.Context to have HTTP context cancelation information at gin.Context\r\nlevel.\r\n\r\nThis is retro-compatible for Golang 1.6, and have no effect if http.Request have no context (as http.Request always provide context.Background is ctx is nil)","created_at":"2018-12-10T18:18:28Z","updated_at":"2018-12-11T12:12:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c103065a8c56ece6128a744a54d43736ec3b3513","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":107421007,"node_id":"MDU6TGFiZWwxMDc0MjEwMDc=","url":"https://api.github.com/repos/gin-gonic/gin/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/gin-gonic/gin/milestones/9","html_url":"https://github.com/gin-gonic/gin/milestone/9","labels_url":"https://api.github.com/repos/gin-gonic/gin/milestones/9/labels","id":3568085,"node_id":"MDk6TWlsZXN0b25lMzU2ODA4NQ==","number":9,"title":"1.4","description":"","creator":{"login":"appleboy","id":21979,"node_id":"MDQ6VXNlcjIxOTc5","avatar_url":"https://avatars0.githubusercontent.com/u/21979?v=4","gravatar_id":"","url":"https://api.github.com/users/appleboy","html_url":"https://github.com/appleboy","followers_url":"https://api.github.com/users/appleboy/followers","following_url":"https://api.github.com/users/appleboy/following{/other_user}","gists_url":"https://api.github.com/users/appleboy/gists{/gist_id}","starred_url":"https://api.github.com/users/appleboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleboy/subscriptions","organizations_url":"https://api.github.com/users/appleboy/orgs","repos_url":"https://api.github.com/users/appleboy/repos","events_url":"https://api.github.com/users/appleboy/events{/privacy}","received_events_url":"https://api.github.com/users/appleboy/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":33,"state":"open","created_at":"2018-08-14T09:18:53Z","updated_at":"2018-12-11T05:39:45Z","due_on":"2019-02-28T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/gin-gonic/gin/pulls/1690/commits","review_comments_url":"https://api.github.com/repos/gin-gonic/gin/pulls/1690/comments","review_comment_url":"https://api.github.com/repos/gin-gonic/gin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gin-gonic/gin/issues/1690/comments","statuses_url":"https://api.github.com/repos/gin-gonic/gin/statuses/db8e64d84babf96c387d388c1926bad93618c1ea","head":{"label":"rbeuque74:context","ref":"context","sha":"db8e64d84babf96c387d388c1926bad93618c1ea","user":{"login":"rbeuque74","id":556072,"node_id":"MDQ6VXNlcjU1NjA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/556072?v=4","gravatar_id":"","url":"https://api.github.com/users/rbeuque74","html_url":"https://github.com/rbeuque74","followers_url":"https://api.github.com/users/rbeuque74/followers","following_url":"https://api.github.com/users/rbeuque74/following{/other_user}","gists_url":"https://api.github.com/users/rbeuque74/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeuque74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeuque74/subscriptions","organizations_url":"https://api.github.com/users/rbeuque74/orgs","repos_url":"https://api.github.com/users/rbeuque74/repos","events_url":"https://api.github.com/users/rbeuque74/events{/privacy}","received_events_url":"https://api.github.com/users/rbeuque74/received_events","type":"User","site_admin":false},"repo":{"id":125578380,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU1NzgzODA=","name":"gin","full_name":"rbeuque74/gin","private":false,"owner":{"login":"rbeuque74","id":556072,"node_id":"MDQ6VXNlcjU1NjA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/556072?v=4","gravatar_id":"","url":"https://api.github.com/users/rbeuque74","html_url":"https://github.com/rbeuque74","followers_url":"https://api.github.com/users/rbeuque74/followers","following_url":"https://api.github.com/users/rbeuque74/following{/other_user}","gists_url":"https://api.github.com/users/rbeuque74/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeuque74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeuque74/subscriptions","organizations_url":"https://api.github.com/users/rbeuque74/orgs","repos_url":"https://api.github.com/users/rbeuque74/repos","events_url":"https://api.github.com/users/rbeuque74/events{/privacy}","received_events_url":"https://api.github.com/users/rbeuque74/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rbeuque74/gin","description":"Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.","fork":true,"url":"https://api.github.com/repos/rbeuque74/gin","forks_url":"https://api.github.com/repos/rbeuque74/gin/forks","keys_url":"https://api.github.com/repos/rbeuque74/gin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbeuque74/gin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbeuque74/gin/teams","hooks_url":"https://api.github.com/repos/rbeuque74/gin/hooks","issue_events_url":"https://api.github.com/repos/rbeuque74/gin/issues/events{/number}","events_url":"https://api.github.com/repos/rbeuque74/gin/events","assignees_url":"https://api.github.com/repos/rbeuque74/gin/assignees{/user}","branches_url":"https://api.github.com/repos/rbeuque74/gin/branches{/branch}","tags_url":"https://api.github.com/repos/rbeuque74/gin/tags","blobs_url":"https://api.github.com/repos/rbeuque74/gin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbeuque74/gin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbeuque74/gin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbeuque74/gin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbeuque74/gin/statuses/{sha}","languages_url":"https://api.github.com/repos/rbeuque74/gin/languages","stargazers_url":"https://api.github.com/repos/rbeuque74/gin/stargazers","contributors_url":"https://api.github.com/repos/rbeuque74/gin/contributors","subscribers_url":"https://api.github.com/repos/rbeuque74/gin/subscribers","subscription_url":"https://api.github.com/repos/rbeuque74/gin/subscription","commits_url":"https://api.github.com/repos/rbeuque74/gin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbeuque74/gin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbeuque74/gin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbeuque74/gin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbeuque74/gin/contents/{+path}","compare_url":"https://api.github.com/repos/rbeuque74/gin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbeuque74/gin/merges","archive_url":"https://api.github.com/repos/rbeuque74/gin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbeuque74/gin/downloads","issues_url":"https://api.github.com/repos/rbeuque74/gin/issues{/number}","pulls_url":"https://api.github.com/repos/rbeuque74/gin/pulls{/number}","milestones_url":"https://api.github.com/repos/rbeuque74/gin/milestones{/number}","notifications_url":"https://api.github.com/repos/rbeuque74/gin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbeuque74/gin/labels{/name}","releases_url":"https://api.github.com/repos/rbeuque74/gin/releases{/id}","deployments_url":"https://api.github.com/repos/rbeuque74/gin/deployments","created_at":"2018-03-16T23:00:40Z","updated_at":"2018-12-10T18:10:10Z","pushed_at":"2018-12-10T18:16:34Z","git_url":"git://github.com/rbeuque74/gin.git","ssh_url":"git@github.com:rbeuque74/gin.git","clone_url":"https://github.com/rbeuque74/gin.git","svn_url":"https://github.com/rbeuque74/gin","homepage":"https://gin-gonic.github.io/gin/","size":2107,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gin-gonic:master","ref":"master","sha":"cce49582d617333c72f4d86abd8ef0e62eb778a0","user":{"login":"gin-gonic","id":7894478,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4OTQ0Nzg=","avatar_url":"https://avatars3.githubusercontent.com/u/7894478?v=4","gravatar_id":"","url":"https://api.github.com/users/gin-gonic","html_url":"https://github.com/gin-gonic","followers_url":"https://api.github.com/users/gin-gonic/followers","following_url":"https://api.github.com/users/gin-gonic/following{/other_user}","gists_url":"https://api.github.com/users/gin-gonic/gists{/gist_id}","starred_url":"https://api.github.com/users/gin-gonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gin-gonic/subscriptions","organizations_url":"https://api.github.com/users/gin-gonic/orgs","repos_url":"https://api.github.com/users/gin-gonic/repos","events_url":"https://api.github.com/users/gin-gonic/events{/privacy}","received_events_url":"https://api.github.com/users/gin-gonic/received_events","type":"Organization","site_admin":false},"repo":{"id":20904437,"node_id":"MDEwOlJlcG9zaXRvcnkyMDkwNDQzNw==","name":"gin","full_name":"gin-gonic/gin","private":false,"owner":{"login":"gin-gonic","id":7894478,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4OTQ0Nzg=","avatar_url":"https://avatars3.githubusercontent.com/u/7894478?v=4","gravatar_id":"","url":"https://api.github.com/users/gin-gonic","html_url":"https://github.com/gin-gonic","followers_url":"https://api.github.com/users/gin-gonic/followers","following_url":"https://api.github.com/users/gin-gonic/following{/other_user}","gists_url":"https://api.github.com/users/gin-gonic/gists{/gist_id}","starred_url":"https://api.github.com/users/gin-gonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gin-gonic/subscriptions","organizations_url":"https://api.github.com/users/gin-gonic/orgs","repos_url":"https://api.github.com/users/gin-gonic/repos","events_url":"https://api.github.com/users/gin-gonic/events{/privacy}","received_events_url":"https://api.github.com/users/gin-gonic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gin-gonic/gin","description":"Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.","fork":false,"url":"https://api.github.com/repos/gin-gonic/gin","forks_url":"https://api.github.com/repos/gin-gonic/gin/forks","keys_url":"https://api.github.com/repos/gin-gonic/gin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gin-gonic/gin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gin-gonic/gin/teams","hooks_url":"https://api.github.com/repos/gin-gonic/gin/hooks","issue_events_url":"https://api.github.com/repos/gin-gonic/gin/issues/events{/number}","events_url":"https://api.github.com/repos/gin-gonic/gin/events","assignees_url":"https://api.github.com/repos/gin-gonic/gin/assignees{/user}","branches_url":"https://api.github.com/repos/gin-gonic/gin/branches{/branch}","tags_url":"https://api.github.com/repos/gin-gonic/gin/tags","blobs_url":"https://api.github.com/repos/gin-gonic/gin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gin-gonic/gin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gin-gonic/gin/git/refs{/sha}","trees_url":"https://api.github.com/repos/gin-gonic/gin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gin-gonic/gin/statuses/{sha}","languages_url":"https://api.github.com/repos/gin-gonic/gin/languages","stargazers_url":"https://api.github.com/repos/gin-gonic/gin/stargazers","contributors_url":"https://api.github.com/repos/gin-gonic/gin/contributors","subscribers_url":"https://api.github.com/repos/gin-gonic/gin/subscribers","subscription_url":"https://api.github.com/repos/gin-gonic/gin/subscription","commits_url":"https://api.github.com/repos/gin-gonic/gin/commits{/sha}","git_commits_url":"https://api.github.com/repos/gin-gonic/gin/git/commits{/sha}","comments_url":"https://api.github.com/repos/gin-gonic/gin/comments{/number}","issue_comment_url":"https://api.github.com/repos/gin-gonic/gin/issues/comments{/number}","contents_url":"https://api.github.com/repos/gin-gonic/gin/contents/{+path}","compare_url":"https://api.github.com/repos/gin-gonic/gin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gin-gonic/gin/merges","archive_url":"https://api.github.com/repos/gin-gonic/gin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gin-gonic/gin/downloads","issues_url":"https://api.github.com/repos/gin-gonic/gin/issues{/number}","pulls_url":"https://api.github.com/repos/gin-gonic/gin/pulls{/number}","milestones_url":"https://api.github.com/repos/gin-gonic/gin/milestones{/number}","notifications_url":"https://api.github.com/repos/gin-gonic/gin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gin-gonic/gin/labels{/name}","releases_url":"https://api.github.com/repos/gin-gonic/gin/releases{/id}","deployments_url":"https://api.github.com/repos/gin-gonic/gin/deployments","created_at":"2014-06-16T23:57:25Z","updated_at":"2018-12-11T11:58:37Z","pushed_at":"2018-12-11T05:31:27Z","git_url":"git://github.com/gin-gonic/gin.git","ssh_url":"git@github.com:gin-gonic/gin.git","clone_url":"https://github.com/gin-gonic/gin.git","svn_url":"https://github.com/gin-gonic/gin","homepage":"https://gin-gonic.github.io/gin/","size":2096,"stargazers_count":22737,"watchers_count":22737,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2687,"mirror_url":null,"archived":false,"open_issues_count":181,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2687,"open_issues":181,"watchers":22737,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/1690"},"html":{"href":"https://github.com/gin-gonic/gin/pull/1690"},"issue":{"href":"https://api.github.com/repos/gin-gonic/gin/issues/1690"},"comments":{"href":"https://api.github.com/repos/gin-gonic/gin/issues/1690/comments"},"review_comments":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/1690/comments"},"review_comment":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gin-gonic/gin/pulls/1690/commits"},"statuses":{"href":"https://api.github.com/repos/gin-gonic/gin/statuses/db8e64d84babf96c387d388c1926bad93618c1ea"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thinkerou"}}