{"action":"created","comment":{"url":"https://api.github.com/repos/uber/go-torch/pulls/comments/48931496","id":48931496,"diff_hunk":"@@ -0,0 +1,57 @@\n+// Copyright (c) 2015 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+package torchLog\n+\n+import (\n+\t\"fmt\"\n+\t\"log\"\n+\t\"time\"\n+\n+\t\"github.com/fatih/color\"\n+)\n+\n+var toRedString = color.New(color.FgRed).SprintFunc()\n+var toBlueString = color.New(color.FgBlue).SprintFunc()","path":"torchLog/torchLog.go","position":32,"original_position":32,"commit_id":"11dd7c7b1bcbaed0ae676177239a10ce6b4669b8","original_commit_id":"11dd7c7b1bcbaed0ae676177239a10ce6b4669b8","user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"body":"nit, suggest a var group\r\n```\r\nvar (\r\n  toRedString = [...]\r\n  toBlueString = [...]\r\n)\r\n```","created_at":"2016-01-06T06:40:57Z","updated_at":"2016-01-06T06:40:57Z","html_url":"https://github.com/uber/go-torch/pull/36#discussion_r48931496","pull_request_url":"https://api.github.com/repos/uber/go-torch/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/uber/go-torch/pulls/comments/48931496"},"html":{"href":"https://github.com/uber/go-torch/pull/36#discussion_r48931496"},"pull_request":{"href":"https://api.github.com/repos/uber/go-torch/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/uber/go-torch/pulls/36","id":55177833,"html_url":"https://github.com/uber/go-torch/pull/36","diff_url":"https://github.com/uber/go-torch/pull/36.diff","patch_url":"https://github.com/uber/go-torch/pull/36.patch","issue_url":"https://api.github.com/repos/uber/go-torch/issues/36","number":36,"state":"open","locked":false,"title":"Add color to log output","user":{"login":"sandlerben","id":4823572,"avatar_url":"https://avatars.githubusercontent.com/u/4823572?v=3","gravatar_id":"","url":"https://api.github.com/users/sandlerben","html_url":"https://github.com/sandlerben","followers_url":"https://api.github.com/users/sandlerben/followers","following_url":"https://api.github.com/users/sandlerben/following{/other_user}","gists_url":"https://api.github.com/users/sandlerben/gists{/gist_id}","starred_url":"https://api.github.com/users/sandlerben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandlerben/subscriptions","organizations_url":"https://api.github.com/users/sandlerben/orgs","repos_url":"https://api.github.com/users/sandlerben/repos","events_url":"https://api.github.com/users/sandlerben/events{/privacy}","received_events_url":"https://api.github.com/users/sandlerben/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-06T05:14:57Z","updated_at":"2016-01-06T06:40:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15434fa7fdbe0085da7e036ea100bf68b69bac1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/go-torch/pulls/36/commits","review_comments_url":"https://api.github.com/repos/uber/go-torch/pulls/36/comments","review_comment_url":"https://api.github.com/repos/uber/go-torch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/go-torch/issues/36/comments","statuses_url":"https://api.github.com/repos/uber/go-torch/statuses/11dd7c7b1bcbaed0ae676177239a10ce6b4669b8","head":{"label":"sandlerben:log-colors","ref":"log-colors","sha":"11dd7c7b1bcbaed0ae676177239a10ce6b4669b8","user":{"login":"sandlerben","id":4823572,"avatar_url":"https://avatars.githubusercontent.com/u/4823572?v=3","gravatar_id":"","url":"https://api.github.com/users/sandlerben","html_url":"https://github.com/sandlerben","followers_url":"https://api.github.com/users/sandlerben/followers","following_url":"https://api.github.com/users/sandlerben/following{/other_user}","gists_url":"https://api.github.com/users/sandlerben/gists{/gist_id}","starred_url":"https://api.github.com/users/sandlerben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandlerben/subscriptions","organizations_url":"https://api.github.com/users/sandlerben/orgs","repos_url":"https://api.github.com/users/sandlerben/repos","events_url":"https://api.github.com/users/sandlerben/events{/privacy}","received_events_url":"https://api.github.com/users/sandlerben/received_events","type":"User","site_admin":false},"repo":{"id":40268919,"name":"go-torch","full_name":"sandlerben/go-torch","owner":{"login":"sandlerben","id":4823572,"avatar_url":"https://avatars.githubusercontent.com/u/4823572?v=3","gravatar_id":"","url":"https://api.github.com/users/sandlerben","html_url":"https://github.com/sandlerben","followers_url":"https://api.github.com/users/sandlerben/followers","following_url":"https://api.github.com/users/sandlerben/following{/other_user}","gists_url":"https://api.github.com/users/sandlerben/gists{/gist_id}","starred_url":"https://api.github.com/users/sandlerben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandlerben/subscriptions","organizations_url":"https://api.github.com/users/sandlerben/orgs","repos_url":"https://api.github.com/users/sandlerben/repos","events_url":"https://api.github.com/users/sandlerben/events{/privacy}","received_events_url":"https://api.github.com/users/sandlerben/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandlerben/go-torch","description":"Stochastic flame graph profiler for Go programs","fork":true,"url":"https://api.github.com/repos/sandlerben/go-torch","forks_url":"https://api.github.com/repos/sandlerben/go-torch/forks","keys_url":"https://api.github.com/repos/sandlerben/go-torch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandlerben/go-torch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandlerben/go-torch/teams","hooks_url":"https://api.github.com/repos/sandlerben/go-torch/hooks","issue_events_url":"https://api.github.com/repos/sandlerben/go-torch/issues/events{/number}","events_url":"https://api.github.com/repos/sandlerben/go-torch/events","assignees_url":"https://api.github.com/repos/sandlerben/go-torch/assignees{/user}","branches_url":"https://api.github.com/repos/sandlerben/go-torch/branches{/branch}","tags_url":"https://api.github.com/repos/sandlerben/go-torch/tags","blobs_url":"https://api.github.com/repos/sandlerben/go-torch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandlerben/go-torch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandlerben/go-torch/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandlerben/go-torch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandlerben/go-torch/statuses/{sha}","languages_url":"https://api.github.com/repos/sandlerben/go-torch/languages","stargazers_url":"https://api.github.com/repos/sandlerben/go-torch/stargazers","contributors_url":"https://api.github.com/repos/sandlerben/go-torch/contributors","subscribers_url":"https://api.github.com/repos/sandlerben/go-torch/subscribers","subscription_url":"https://api.github.com/repos/sandlerben/go-torch/subscription","commits_url":"https://api.github.com/repos/sandlerben/go-torch/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandlerben/go-torch/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandlerben/go-torch/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandlerben/go-torch/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandlerben/go-torch/contents/{+path}","compare_url":"https://api.github.com/repos/sandlerben/go-torch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandlerben/go-torch/merges","archive_url":"https://api.github.com/repos/sandlerben/go-torch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandlerben/go-torch/downloads","issues_url":"https://api.github.com/repos/sandlerben/go-torch/issues{/number}","pulls_url":"https://api.github.com/repos/sandlerben/go-torch/pulls{/number}","milestones_url":"https://api.github.com/repos/sandlerben/go-torch/milestones{/number}","notifications_url":"https://api.github.com/repos/sandlerben/go-torch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandlerben/go-torch/labels{/name}","releases_url":"https://api.github.com/repos/sandlerben/go-torch/releases{/id}","created_at":"2015-08-05T21:07:39Z","updated_at":"2015-08-05T21:07:39Z","pushed_at":"2016-01-06T05:42:26Z","git_url":"git://github.com/sandlerben/go-torch.git","ssh_url":"git@github.com:sandlerben/go-torch.git","clone_url":"https://github.com/sandlerben/go-torch.git","svn_url":"https://github.com/sandlerben/go-torch","homepage":"","size":151,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"346e7a5d2533e7bd5d212c19fef720b97900d89a","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":39473685,"name":"go-torch","full_name":"uber/go-torch","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/go-torch","description":"Stochastic flame graph profiler for Go programs","fork":false,"url":"https://api.github.com/repos/uber/go-torch","forks_url":"https://api.github.com/repos/uber/go-torch/forks","keys_url":"https://api.github.com/repos/uber/go-torch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/go-torch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/go-torch/teams","hooks_url":"https://api.github.com/repos/uber/go-torch/hooks","issue_events_url":"https://api.github.com/repos/uber/go-torch/issues/events{/number}","events_url":"https://api.github.com/repos/uber/go-torch/events","assignees_url":"https://api.github.com/repos/uber/go-torch/assignees{/user}","branches_url":"https://api.github.com/repos/uber/go-torch/branches{/branch}","tags_url":"https://api.github.com/repos/uber/go-torch/tags","blobs_url":"https://api.github.com/repos/uber/go-torch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/go-torch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/go-torch/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/go-torch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/go-torch/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/go-torch/languages","stargazers_url":"https://api.github.com/repos/uber/go-torch/stargazers","contributors_url":"https://api.github.com/repos/uber/go-torch/contributors","subscribers_url":"https://api.github.com/repos/uber/go-torch/subscribers","subscription_url":"https://api.github.com/repos/uber/go-torch/subscription","commits_url":"https://api.github.com/repos/uber/go-torch/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/go-torch/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/go-torch/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/go-torch/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/go-torch/contents/{+path}","compare_url":"https://api.github.com/repos/uber/go-torch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/go-torch/merges","archive_url":"https://api.github.com/repos/uber/go-torch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/go-torch/downloads","issues_url":"https://api.github.com/repos/uber/go-torch/issues{/number}","pulls_url":"https://api.github.com/repos/uber/go-torch/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/go-torch/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/go-torch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/go-torch/labels{/name}","releases_url":"https://api.github.com/repos/uber/go-torch/releases{/id}","created_at":"2015-07-21T22:49:42Z","updated_at":"2016-01-03T06:52:35Z","pushed_at":"2016-01-06T06:34:49Z","git_url":"git://github.com/uber/go-torch.git","ssh_url":"git@github.com:uber/go-torch.git","clone_url":"https://github.com/uber/go-torch.git","svn_url":"https://github.com/uber/go-torch","homepage":"","size":155,"stargazers_count":671,"watchers_count":671,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":3,"forks":16,"open_issues":3,"watchers":671,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/go-torch/pulls/36"},"html":{"href":"https://github.com/uber/go-torch/pull/36"},"issue":{"href":"https://api.github.com/repos/uber/go-torch/issues/36"},"comments":{"href":"https://api.github.com/repos/uber/go-torch/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/go-torch/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/go-torch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/go-torch/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/uber/go-torch/statuses/11dd7c7b1bcbaed0ae676177239a10ce6b4669b8"}}}}