{"action":"created","comment":{"url":"https://api.github.com/repos/segmentio/analytics-go/pulls/comments/60635979","id":60635979,"diff_hunk":"@@ -493,3 +493,27 @@ func TestTrackWithIntegrations(t *testing.T) {\n \t\tt.Errorf(\"invalid response:\\n- expected %s\\n- received: %s\", ref, res)\n \t}\n }\n+\n+func TestCloseTwice(t *testing.T) {\n+\tclient := New(\"0123456789\")\n+\n+\tif err := client.Close(); err != nil {\n+\t\tt.Error(\"closing a client should not a return an error\")\n+\t}\n+\n+\tif err := client.Close(); err != io.EOF {\n+\t\tt.Error(\"closing a client a second time should return io.EOF:\", err)\n+\t}\n+}\n+\n+func TestCloseTwice(t *testing.T) {","path":"analytics_test.go","position":17,"original_position":17,"commit_id":"ab3a4c222f31717d0ab3e1237f1b781ff8552639","original_commit_id":"ab3a4c222f31717d0ab3e1237f1b781ff8552639","user":{"login":"f2prateek","id":843979,"avatar_url":"https://avatars.githubusercontent.com/u/843979?v=3","gravatar_id":"","url":"https://api.github.com/users/f2prateek","html_url":"https://github.com/f2prateek","followers_url":"https://api.github.com/users/f2prateek/followers","following_url":"https://api.github.com/users/f2prateek/following{/other_user}","gists_url":"https://api.github.com/users/f2prateek/gists{/gist_id}","starred_url":"https://api.github.com/users/f2prateek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f2prateek/subscriptions","organizations_url":"https://api.github.com/users/f2prateek/orgs","repos_url":"https://api.github.com/users/f2prateek/repos","events_url":"https://api.github.com/users/f2prateek/events{/privacy}","received_events_url":"https://api.github.com/users/f2prateek/received_events","type":"User","site_admin":false},"body":"I think we can remove this one.","created_at":"2016-04-21T18:53:55Z","updated_at":"2016-04-21T18:53:55Z","html_url":"https://github.com/segmentio/analytics-go/pull/66#discussion_r60635979","pull_request_url":"https://api.github.com/repos/segmentio/analytics-go/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/comments/60635979"},"html":{"href":"https://github.com/segmentio/analytics-go/pull/66#discussion_r60635979"},"pull_request":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/segmentio/analytics-go/pulls/66","id":67400102,"html_url":"https://github.com/segmentio/analytics-go/pull/66","diff_url":"https://github.com/segmentio/analytics-go/pull/66.diff","patch_url":"https://github.com/segmentio/analytics-go/pull/66.patch","issue_url":"https://api.github.com/repos/segmentio/analytics-go/issues/66","number":66,"state":"open","locked":false,"title":"Close client twice (v3.0)","user":{"login":"achille-roussel","id":865510,"avatar_url":"https://avatars.githubusercontent.com/u/865510?v=3","gravatar_id":"","url":"https://api.github.com/users/achille-roussel","html_url":"https://github.com/achille-roussel","followers_url":"https://api.github.com/users/achille-roussel/followers","following_url":"https://api.github.com/users/achille-roussel/following{/other_user}","gists_url":"https://api.github.com/users/achille-roussel/gists{/gist_id}","starred_url":"https://api.github.com/users/achille-roussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achille-roussel/subscriptions","organizations_url":"https://api.github.com/users/achille-roussel/orgs","repos_url":"https://api.github.com/users/achille-roussel/repos","events_url":"https://api.github.com/users/achille-roussel/events{/privacy}","received_events_url":"https://api.github.com/users/achille-roussel/received_events","type":"User","site_admin":false},"body":"@f2prateek \r\n@calvinfo \r\n\r\nFixes #55 \r\n\r\nFollow up of #62 but will merge into `v3.0` instead of `master`.\r\n\r\nPlease let me know if anything needs to be changed.","created_at":"2016-04-21T18:26:25Z","updated_at":"2016-04-21T18:53:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ca5c3ce969cbaff13e4bf01dbc0998ccae7922e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/analytics-go/pulls/66/commits","review_comments_url":"https://api.github.com/repos/segmentio/analytics-go/pulls/66/comments","review_comment_url":"https://api.github.com/repos/segmentio/analytics-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segmentio/analytics-go/issues/66/comments","statuses_url":"https://api.github.com/repos/segmentio/analytics-go/statuses/ab3a4c222f31717d0ab3e1237f1b781ff8552639","head":{"label":"segmentio:close-client-twice","ref":"close-client-twice","sha":"ab3a4c222f31717d0ab3e1237f1b781ff8552639","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":19091205,"name":"analytics-go","full_name":"segmentio/analytics-go","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/analytics-go","description":"Segment analytics client for Go","fork":false,"url":"https://api.github.com/repos/segmentio/analytics-go","forks_url":"https://api.github.com/repos/segmentio/analytics-go/forks","keys_url":"https://api.github.com/repos/segmentio/analytics-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/analytics-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/analytics-go/teams","hooks_url":"https://api.github.com/repos/segmentio/analytics-go/hooks","issue_events_url":"https://api.github.com/repos/segmentio/analytics-go/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/analytics-go/events","assignees_url":"https://api.github.com/repos/segmentio/analytics-go/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/analytics-go/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/analytics-go/tags","blobs_url":"https://api.github.com/repos/segmentio/analytics-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/analytics-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/analytics-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/analytics-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/analytics-go/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/analytics-go/languages","stargazers_url":"https://api.github.com/repos/segmentio/analytics-go/stargazers","contributors_url":"https://api.github.com/repos/segmentio/analytics-go/contributors","subscribers_url":"https://api.github.com/repos/segmentio/analytics-go/subscribers","subscription_url":"https://api.github.com/repos/segmentio/analytics-go/subscription","commits_url":"https://api.github.com/repos/segmentio/analytics-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/analytics-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/analytics-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/analytics-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/analytics-go/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/analytics-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/analytics-go/merges","archive_url":"https://api.github.com/repos/segmentio/analytics-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/analytics-go/downloads","issues_url":"https://api.github.com/repos/segmentio/analytics-go/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/analytics-go/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/analytics-go/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/analytics-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/analytics-go/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/analytics-go/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/analytics-go/deployments","created_at":"2014-04-24T01:15:51Z","updated_at":"2016-04-16T23:38:53Z","pushed_at":"2016-04-21T18:29:30Z","git_url":"git://github.com/segmentio/analytics-go.git","ssh_url":"git@github.com:segmentio/analytics-go.git","clone_url":"https://github.com/segmentio/analytics-go.git","svn_url":"https://github.com/segmentio/analytics-go","homepage":"https://segment.com/docs/libraries/go","size":103,"stargazers_count":53,"watchers_count":53,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":20,"forks":16,"open_issues":20,"watchers":53,"default_branch":"master"}},"base":{"label":"segmentio:v3.0","ref":"v3.0","sha":"ab34a85c387c25d72a3c6ab5bf7092db19380b37","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":19091205,"name":"analytics-go","full_name":"segmentio/analytics-go","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/analytics-go","description":"Segment analytics client for Go","fork":false,"url":"https://api.github.com/repos/segmentio/analytics-go","forks_url":"https://api.github.com/repos/segmentio/analytics-go/forks","keys_url":"https://api.github.com/repos/segmentio/analytics-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/analytics-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/analytics-go/teams","hooks_url":"https://api.github.com/repos/segmentio/analytics-go/hooks","issue_events_url":"https://api.github.com/repos/segmentio/analytics-go/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/analytics-go/events","assignees_url":"https://api.github.com/repos/segmentio/analytics-go/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/analytics-go/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/analytics-go/tags","blobs_url":"https://api.github.com/repos/segmentio/analytics-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/analytics-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/analytics-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/analytics-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/analytics-go/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/analytics-go/languages","stargazers_url":"https://api.github.com/repos/segmentio/analytics-go/stargazers","contributors_url":"https://api.github.com/repos/segmentio/analytics-go/contributors","subscribers_url":"https://api.github.com/repos/segmentio/analytics-go/subscribers","subscription_url":"https://api.github.com/repos/segmentio/analytics-go/subscription","commits_url":"https://api.github.com/repos/segmentio/analytics-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/analytics-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/analytics-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/analytics-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/analytics-go/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/analytics-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/analytics-go/merges","archive_url":"https://api.github.com/repos/segmentio/analytics-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/analytics-go/downloads","issues_url":"https://api.github.com/repos/segmentio/analytics-go/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/analytics-go/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/analytics-go/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/analytics-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/analytics-go/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/analytics-go/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/analytics-go/deployments","created_at":"2014-04-24T01:15:51Z","updated_at":"2016-04-16T23:38:53Z","pushed_at":"2016-04-21T18:29:30Z","git_url":"git://github.com/segmentio/analytics-go.git","ssh_url":"git@github.com:segmentio/analytics-go.git","clone_url":"https://github.com/segmentio/analytics-go.git","svn_url":"https://github.com/segmentio/analytics-go","homepage":"https://segment.com/docs/libraries/go","size":103,"stargazers_count":53,"watchers_count":53,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":20,"forks":16,"open_issues":20,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/66"},"html":{"href":"https://github.com/segmentio/analytics-go/pull/66"},"issue":{"href":"https://api.github.com/repos/segmentio/analytics-go/issues/66"},"comments":{"href":"https://api.github.com/repos/segmentio/analytics-go/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segmentio/analytics-go/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/analytics-go/statuses/ab3a4c222f31717d0ab3e1237f1b781ff8552639"}}}}