{"action":"created","comment":{"url":"https://api.github.com/repos/christophgockel/goony/pulls/comments/48437123","id":48437123,"diff_hunk":"@@ -77,3 +82,20 @@ func outputFile(filename string) files.File {\n \n \treturn file\n }\n+\n+func startContentStream(options config.Options, file files.File, linesChannel chan string) {\n+\tif options.RunEndless == true {\n+\t\tstop := make(chan bool, 1)\n+\t\tcatchCtrlC(stop)\n+\t\tgo files.StreamContentForever(file, linesChannel, stop)\n+\t} else {\n+\t\tgo files.StreamContent(file, linesChannel)","path":"goony.go","position":38,"original_position":38,"commit_id":"31c6ebc460263e8a910b6126548ff8f85f2d5e8e","original_commit_id":"31c6ebc460263e8a910b6126548ff8f85f2d5e8e","user":{"login":"felipesere","id":1850188,"avatar_url":"https://avatars.githubusercontent.com/u/1850188?v=3","gravatar_id":"","url":"https://api.github.com/users/felipesere","html_url":"https://github.com/felipesere","followers_url":"https://api.github.com/users/felipesere/followers","following_url":"https://api.github.com/users/felipesere/following{/other_user}","gists_url":"https://api.github.com/users/felipesere/gists{/gist_id}","starred_url":"https://api.github.com/users/felipesere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipesere/subscriptions","organizations_url":"https://api.github.com/users/felipesere/orgs","repos_url":"https://api.github.com/users/felipesere/repos","events_url":"https://api.github.com/users/felipesere/events{/privacy}","received_events_url":"https://api.github.com/users/felipesere/received_events","type":"User","site_admin":false},"body":"I wonder if it would make sense to align `StreamContent` to `StreamContentForever`?\r\nThe CTRL-C functionality wouldn't hurt `StreamContent`, right?\r\nMaybe you can even go as far as printing some useful stats to stderr after CTRL-C?","created_at":"2015-12-25T09:44:46Z","updated_at":"2015-12-25T09:44:46Z","html_url":"https://github.com/christophgockel/goony/pull/6#discussion_r48437123","pull_request_url":"https://api.github.com/repos/christophgockel/goony/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/comments/48437123"},"html":{"href":"https://github.com/christophgockel/goony/pull/6#discussion_r48437123"},"pull_request":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/christophgockel/goony/pulls/6","id":54549614,"html_url":"https://github.com/christophgockel/goony/pull/6","diff_url":"https://github.com/christophgockel/goony/pull/6.diff","patch_url":"https://github.com/christophgockel/goony/pull/6.patch","issue_url":"https://api.github.com/repos/christophgockel/goony/issues/6","number":6,"state":"open","locked":false,"title":"Endless mode / Continuous read","user":{"login":"christophgockel","id":190137,"avatar_url":"https://avatars.githubusercontent.com/u/190137?v=3","gravatar_id":"","url":"https://api.github.com/users/christophgockel","html_url":"https://github.com/christophgockel","followers_url":"https://api.github.com/users/christophgockel/followers","following_url":"https://api.github.com/users/christophgockel/following{/other_user}","gists_url":"https://api.github.com/users/christophgockel/gists{/gist_id}","starred_url":"https://api.github.com/users/christophgockel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophgockel/subscriptions","organizations_url":"https://api.github.com/users/christophgockel/orgs","repos_url":"https://api.github.com/users/christophgockel/repos","events_url":"https://api.github.com/users/christophgockel/events{/privacy}","received_events_url":"https://api.github.com/users/christophgockel/received_events","type":"User","site_admin":false},"body":"First stab at endless mode.\r\nNot 100% happy with `StreamContentForever()` but reading from more than one channel asks for a `select`.\r\nI'd like to simplify it more but can't think of a good way at the moment.\r\nOne thing I thought of is completely ignoring the \"graceful\" termination that is currently implemented in this PR.\r\nAs it is right now, a Ctrl+C is caught and then a message is passed to the streaming function to stop streaming (via the `stop` channel).\r\nFrom there on all remaining worker routines stop their work and eventually `main` is exited normally.\r\n\r\nI was wondering if that is actually needed and if it would be feasible to ignore it and just have Ctrl+C terminate the program in whichever state it currently is.","created_at":"2015-12-24T12:54:53Z","updated_at":"2015-12-25T09:44:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ea212fa583c3277d02d4c05fff99d4399f7cc1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/christophgockel/goony/pulls/6/commits","review_comments_url":"https://api.github.com/repos/christophgockel/goony/pulls/6/comments","review_comment_url":"https://api.github.com/repos/christophgockel/goony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/christophgockel/goony/issues/6/comments","statuses_url":"https://api.github.com/repos/christophgockel/goony/statuses/31c6ebc460263e8a910b6126548ff8f85f2d5e8e","head":{"label":"christophgockel:continuous-read","ref":"continuous-read","sha":"31c6ebc460263e8a910b6126548ff8f85f2d5e8e","user":{"login":"christophgockel","id":190137,"avatar_url":"https://avatars.githubusercontent.com/u/190137?v=3","gravatar_id":"","url":"https://api.github.com/users/christophgockel","html_url":"https://github.com/christophgockel","followers_url":"https://api.github.com/users/christophgockel/followers","following_url":"https://api.github.com/users/christophgockel/following{/other_user}","gists_url":"https://api.github.com/users/christophgockel/gists{/gist_id}","starred_url":"https://api.github.com/users/christophgockel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophgockel/subscriptions","organizations_url":"https://api.github.com/users/christophgockel/orgs","repos_url":"https://api.github.com/users/christophgockel/repos","events_url":"https://api.github.com/users/christophgockel/events{/privacy}","received_events_url":"https://api.github.com/users/christophgockel/received_events","type":"User","site_admin":false},"repo":{"id":46363592,"name":"goony","full_name":"christophgockel/goony","owner":{"login":"christophgockel","id":190137,"avatar_url":"https://avatars.githubusercontent.com/u/190137?v=3","gravatar_id":"","url":"https://api.github.com/users/christophgockel","html_url":"https://github.com/christophgockel","followers_url":"https://api.github.com/users/christophgockel/followers","following_url":"https://api.github.com/users/christophgockel/following{/other_user}","gists_url":"https://api.github.com/users/christophgockel/gists{/gist_id}","starred_url":"https://api.github.com/users/christophgockel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophgockel/subscriptions","organizations_url":"https://api.github.com/users/christophgockel/orgs","repos_url":"https://api.github.com/users/christophgockel/repos","events_url":"https://api.github.com/users/christophgockel/events{/privacy}","received_events_url":"https://api.github.com/users/christophgockel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christophgockel/goony","description":"Simple Load Testing","fork":false,"url":"https://api.github.com/repos/christophgockel/goony","forks_url":"https://api.github.com/repos/christophgockel/goony/forks","keys_url":"https://api.github.com/repos/christophgockel/goony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christophgockel/goony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christophgockel/goony/teams","hooks_url":"https://api.github.com/repos/christophgockel/goony/hooks","issue_events_url":"https://api.github.com/repos/christophgockel/goony/issues/events{/number}","events_url":"https://api.github.com/repos/christophgockel/goony/events","assignees_url":"https://api.github.com/repos/christophgockel/goony/assignees{/user}","branches_url":"https://api.github.com/repos/christophgockel/goony/branches{/branch}","tags_url":"https://api.github.com/repos/christophgockel/goony/tags","blobs_url":"https://api.github.com/repos/christophgockel/goony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christophgockel/goony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christophgockel/goony/git/refs{/sha}","trees_url":"https://api.github.com/repos/christophgockel/goony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christophgockel/goony/statuses/{sha}","languages_url":"https://api.github.com/repos/christophgockel/goony/languages","stargazers_url":"https://api.github.com/repos/christophgockel/goony/stargazers","contributors_url":"https://api.github.com/repos/christophgockel/goony/contributors","subscribers_url":"https://api.github.com/repos/christophgockel/goony/subscribers","subscription_url":"https://api.github.com/repos/christophgockel/goony/subscription","commits_url":"https://api.github.com/repos/christophgockel/goony/commits{/sha}","git_commits_url":"https://api.github.com/repos/christophgockel/goony/git/commits{/sha}","comments_url":"https://api.github.com/repos/christophgockel/goony/comments{/number}","issue_comment_url":"https://api.github.com/repos/christophgockel/goony/issues/comments{/number}","contents_url":"https://api.github.com/repos/christophgockel/goony/contents/{+path}","compare_url":"https://api.github.com/repos/christophgockel/goony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christophgockel/goony/merges","archive_url":"https://api.github.com/repos/christophgockel/goony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christophgockel/goony/downloads","issues_url":"https://api.github.com/repos/christophgockel/goony/issues{/number}","pulls_url":"https://api.github.com/repos/christophgockel/goony/pulls{/number}","milestones_url":"https://api.github.com/repos/christophgockel/goony/milestones{/number}","notifications_url":"https://api.github.com/repos/christophgockel/goony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christophgockel/goony/labels{/name}","releases_url":"https://api.github.com/repos/christophgockel/goony/releases{/id}","created_at":"2015-11-17T17:29:18Z","updated_at":"2015-11-18T11:23:39Z","pushed_at":"2015-12-24T12:54:53Z","git_url":"git://github.com/christophgockel/goony.git","ssh_url":"git@github.com:christophgockel/goony.git","clone_url":"https://github.com/christophgockel/goony.git","svn_url":"https://github.com/christophgockel/goony","homepage":null,"size":26,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"christophgockel:develop","ref":"develop","sha":"5a46e8d94e9c2fa02dcbd43d6d3035536c3c2789","user":{"login":"christophgockel","id":190137,"avatar_url":"https://avatars.githubusercontent.com/u/190137?v=3","gravatar_id":"","url":"https://api.github.com/users/christophgockel","html_url":"https://github.com/christophgockel","followers_url":"https://api.github.com/users/christophgockel/followers","following_url":"https://api.github.com/users/christophgockel/following{/other_user}","gists_url":"https://api.github.com/users/christophgockel/gists{/gist_id}","starred_url":"https://api.github.com/users/christophgockel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophgockel/subscriptions","organizations_url":"https://api.github.com/users/christophgockel/orgs","repos_url":"https://api.github.com/users/christophgockel/repos","events_url":"https://api.github.com/users/christophgockel/events{/privacy}","received_events_url":"https://api.github.com/users/christophgockel/received_events","type":"User","site_admin":false},"repo":{"id":46363592,"name":"goony","full_name":"christophgockel/goony","owner":{"login":"christophgockel","id":190137,"avatar_url":"https://avatars.githubusercontent.com/u/190137?v=3","gravatar_id":"","url":"https://api.github.com/users/christophgockel","html_url":"https://github.com/christophgockel","followers_url":"https://api.github.com/users/christophgockel/followers","following_url":"https://api.github.com/users/christophgockel/following{/other_user}","gists_url":"https://api.github.com/users/christophgockel/gists{/gist_id}","starred_url":"https://api.github.com/users/christophgockel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophgockel/subscriptions","organizations_url":"https://api.github.com/users/christophgockel/orgs","repos_url":"https://api.github.com/users/christophgockel/repos","events_url":"https://api.github.com/users/christophgockel/events{/privacy}","received_events_url":"https://api.github.com/users/christophgockel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christophgockel/goony","description":"Simple Load Testing","fork":false,"url":"https://api.github.com/repos/christophgockel/goony","forks_url":"https://api.github.com/repos/christophgockel/goony/forks","keys_url":"https://api.github.com/repos/christophgockel/goony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christophgockel/goony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christophgockel/goony/teams","hooks_url":"https://api.github.com/repos/christophgockel/goony/hooks","issue_events_url":"https://api.github.com/repos/christophgockel/goony/issues/events{/number}","events_url":"https://api.github.com/repos/christophgockel/goony/events","assignees_url":"https://api.github.com/repos/christophgockel/goony/assignees{/user}","branches_url":"https://api.github.com/repos/christophgockel/goony/branches{/branch}","tags_url":"https://api.github.com/repos/christophgockel/goony/tags","blobs_url":"https://api.github.com/repos/christophgockel/goony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christophgockel/goony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christophgockel/goony/git/refs{/sha}","trees_url":"https://api.github.com/repos/christophgockel/goony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christophgockel/goony/statuses/{sha}","languages_url":"https://api.github.com/repos/christophgockel/goony/languages","stargazers_url":"https://api.github.com/repos/christophgockel/goony/stargazers","contributors_url":"https://api.github.com/repos/christophgockel/goony/contributors","subscribers_url":"https://api.github.com/repos/christophgockel/goony/subscribers","subscription_url":"https://api.github.com/repos/christophgockel/goony/subscription","commits_url":"https://api.github.com/repos/christophgockel/goony/commits{/sha}","git_commits_url":"https://api.github.com/repos/christophgockel/goony/git/commits{/sha}","comments_url":"https://api.github.com/repos/christophgockel/goony/comments{/number}","issue_comment_url":"https://api.github.com/repos/christophgockel/goony/issues/comments{/number}","contents_url":"https://api.github.com/repos/christophgockel/goony/contents/{+path}","compare_url":"https://api.github.com/repos/christophgockel/goony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christophgockel/goony/merges","archive_url":"https://api.github.com/repos/christophgockel/goony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christophgockel/goony/downloads","issues_url":"https://api.github.com/repos/christophgockel/goony/issues{/number}","pulls_url":"https://api.github.com/repos/christophgockel/goony/pulls{/number}","milestones_url":"https://api.github.com/repos/christophgockel/goony/milestones{/number}","notifications_url":"https://api.github.com/repos/christophgockel/goony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christophgockel/goony/labels{/name}","releases_url":"https://api.github.com/repos/christophgockel/goony/releases{/id}","created_at":"2015-11-17T17:29:18Z","updated_at":"2015-11-18T11:23:39Z","pushed_at":"2015-12-24T12:54:53Z","git_url":"git://github.com/christophgockel/goony.git","ssh_url":"git@github.com:christophgockel/goony.git","clone_url":"https://github.com/christophgockel/goony.git","svn_url":"https://github.com/christophgockel/goony","homepage":null,"size":26,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/6"},"html":{"href":"https://github.com/christophgockel/goony/pull/6"},"issue":{"href":"https://api.github.com/repos/christophgockel/goony/issues/6"},"comments":{"href":"https://api.github.com/repos/christophgockel/goony/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/christophgockel/goony/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/christophgockel/goony/statuses/31c6ebc460263e8a910b6126548ff8f85f2d5e8e"}}}}