{"action":"created","comment":{"url":"https://api.github.com/repos/Tonkpils/snag/pulls/comments/55141126","id":55141126,"diff_hunk":"@@ -0,0 +1,156 @@\n+package watcher\n+\n+import (\n+\t\"log\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\t\"strings\"\n+\t\"time\"\n+\n+\t\"github.com/Tonkpils/snag/exchange\"\n+\tfsn \"gopkg.in/fsnotify.v1\"\n+)\n+\n+const rebuild = \"rebuild\"\n+\n+type Watcher interface {\n+\tWatch(string) error\n+}\n+\n+type FSWatcher struct {\n+\tex           exchange.SendListener\n+\tfsn          *fsn.Watcher\n+\tdone         chan struct{}\n+\tmtimes       map[string]time.Time\n+\twatching     map[string]struct{}\n+\twatchDir     string\n+\tignoredItems []string\n+}\n+\n+func New(ex exchange.SendListener, ignoredItems []string) (Watcher, error) {","path":"watcher/watcher.go","position":30,"original_position":30,"commit_id":"bc1b6a6c54b8f519a603fad11a3f6a760bbf8674","original_commit_id":"3fd8c89a7be5520c6a0732e550c560717ee02a0d","user":{"login":"zabawaba99","id":2306786,"avatar_url":"https://avatars.githubusercontent.com/u/2306786?v=3","gravatar_id":"","url":"https://api.github.com/users/zabawaba99","html_url":"https://github.com/zabawaba99","followers_url":"https://api.github.com/users/zabawaba99/followers","following_url":"https://api.github.com/users/zabawaba99/following{/other_user}","gists_url":"https://api.github.com/users/zabawaba99/gists{/gist_id}","starred_url":"https://api.github.com/users/zabawaba99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zabawaba99/subscriptions","organizations_url":"https://api.github.com/users/zabawaba99/orgs","repos_url":"https://api.github.com/users/zabawaba99/repos","events_url":"https://api.github.com/users/zabawaba99/events{/privacy}","received_events_url":"https://api.github.com/users/zabawaba99/received_events","type":"User","site_admin":false},"body":"Sounds good. I'm definitely interested in seeing what you said in the code. I agree that the separation of concern is important, I'm just having s little trouble visualizing. ","created_at":"2016-03-06T14:57:51Z","updated_at":"2016-03-06T14:57:51Z","html_url":"https://github.com/Tonkpils/snag/pull/61#discussion_r55141126","pull_request_url":"https://api.github.com/repos/Tonkpils/snag/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/comments/55141126"},"html":{"href":"https://github.com/Tonkpils/snag/pull/61#discussion_r55141126"},"pull_request":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/Tonkpils/snag/pulls/61","id":61826162,"html_url":"https://github.com/Tonkpils/snag/pull/61","diff_url":"https://github.com/Tonkpils/snag/pull/61.diff","patch_url":"https://github.com/Tonkpils/snag/pull/61.patch","issue_url":"https://api.github.com/repos/Tonkpils/snag/issues/61","number":61,"state":"closed","locked":false,"title":"WIP Exchange Architecture","user":{"login":"zabawaba99","id":2306786,"avatar_url":"https://avatars.githubusercontent.com/u/2306786?v=3","gravatar_id":"","url":"https://api.github.com/users/zabawaba99","html_url":"https://github.com/zabawaba99","followers_url":"https://api.github.com/users/zabawaba99/followers","following_url":"https://api.github.com/users/zabawaba99/following{/other_user}","gists_url":"https://api.github.com/users/zabawaba99/gists{/gist_id}","starred_url":"https://api.github.com/users/zabawaba99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zabawaba99/subscriptions","organizations_url":"https://api.github.com/users/zabawaba99/orgs","repos_url":"https://api.github.com/users/zabawaba99/repos","events_url":"https://api.github.com/users/zabawaba99/events{/privacy}","received_events_url":"https://api.github.com/users/zabawaba99/received_events","type":"User","site_admin":false},"body":"Relates to #21 \r\n\r\nSo far, I've just moved code around. There are still more tests to be written and more cleaning up to be done but I didn't want to do that all at once since this is already a lot of changes. ","created_at":"2016-03-05T22:18:59Z","updated_at":"2016-03-06T14:57:51Z","closed_at":"2016-03-06T14:54:14Z","merged_at":"2016-03-06T14:54:14Z","merge_commit_sha":"fe27702a7e8fdce3df4d24d8a7930e6adaac9451","assignee":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Tonkpils/snag/pulls/61/commits","review_comments_url":"https://api.github.com/repos/Tonkpils/snag/pulls/61/comments","review_comment_url":"https://api.github.com/repos/Tonkpils/snag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tonkpils/snag/issues/61/comments","statuses_url":"https://api.github.com/repos/Tonkpils/snag/statuses/bc1b6a6c54b8f519a603fad11a3f6a760bbf8674","head":{"label":"Tonkpils:exchange","ref":"exchange","sha":"bc1b6a6c54b8f519a603fad11a3f6a760bbf8674","user":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"repo":{"id":39155060,"name":"snag","full_name":"Tonkpils/snag","owner":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tonkpils/snag","description":"Automatic build tool for all your projects","fork":false,"url":"https://api.github.com/repos/Tonkpils/snag","forks_url":"https://api.github.com/repos/Tonkpils/snag/forks","keys_url":"https://api.github.com/repos/Tonkpils/snag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tonkpils/snag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tonkpils/snag/teams","hooks_url":"https://api.github.com/repos/Tonkpils/snag/hooks","issue_events_url":"https://api.github.com/repos/Tonkpils/snag/issues/events{/number}","events_url":"https://api.github.com/repos/Tonkpils/snag/events","assignees_url":"https://api.github.com/repos/Tonkpils/snag/assignees{/user}","branches_url":"https://api.github.com/repos/Tonkpils/snag/branches{/branch}","tags_url":"https://api.github.com/repos/Tonkpils/snag/tags","blobs_url":"https://api.github.com/repos/Tonkpils/snag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tonkpils/snag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tonkpils/snag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tonkpils/snag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tonkpils/snag/statuses/{sha}","languages_url":"https://api.github.com/repos/Tonkpils/snag/languages","stargazers_url":"https://api.github.com/repos/Tonkpils/snag/stargazers","contributors_url":"https://api.github.com/repos/Tonkpils/snag/contributors","subscribers_url":"https://api.github.com/repos/Tonkpils/snag/subscribers","subscription_url":"https://api.github.com/repos/Tonkpils/snag/subscription","commits_url":"https://api.github.com/repos/Tonkpils/snag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tonkpils/snag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tonkpils/snag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tonkpils/snag/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tonkpils/snag/contents/{+path}","compare_url":"https://api.github.com/repos/Tonkpils/snag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tonkpils/snag/merges","archive_url":"https://api.github.com/repos/Tonkpils/snag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tonkpils/snag/downloads","issues_url":"https://api.github.com/repos/Tonkpils/snag/issues{/number}","pulls_url":"https://api.github.com/repos/Tonkpils/snag/pulls{/number}","milestones_url":"https://api.github.com/repos/Tonkpils/snag/milestones{/number}","notifications_url":"https://api.github.com/repos/Tonkpils/snag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tonkpils/snag/labels{/name}","releases_url":"https://api.github.com/repos/Tonkpils/snag/releases{/id}","deployments_url":"https://api.github.com/repos/Tonkpils/snag/deployments","created_at":"2015-07-15T18:53:32Z","updated_at":"2016-02-06T05:19:02Z","pushed_at":"2016-03-06T14:54:25Z","git_url":"git://github.com/Tonkpils/snag.git","ssh_url":"git@github.com:Tonkpils/snag.git","clone_url":"https://github.com/Tonkpils/snag.git","svn_url":"https://github.com/Tonkpils/snag","homepage":"","size":1492,"stargazers_count":24,"watchers_count":24,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":24,"default_branch":"master"}},"base":{"label":"Tonkpils:restructure","ref":"restructure","sha":"7f8829737a1d63998cd794c8a942364be5d1e5c5","user":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"repo":{"id":39155060,"name":"snag","full_name":"Tonkpils/snag","owner":{"login":"Tonkpils","id":1507561,"avatar_url":"https://avatars.githubusercontent.com/u/1507561?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonkpils","html_url":"https://github.com/Tonkpils","followers_url":"https://api.github.com/users/Tonkpils/followers","following_url":"https://api.github.com/users/Tonkpils/following{/other_user}","gists_url":"https://api.github.com/users/Tonkpils/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonkpils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonkpils/subscriptions","organizations_url":"https://api.github.com/users/Tonkpils/orgs","repos_url":"https://api.github.com/users/Tonkpils/repos","events_url":"https://api.github.com/users/Tonkpils/events{/privacy}","received_events_url":"https://api.github.com/users/Tonkpils/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tonkpils/snag","description":"Automatic build tool for all your projects","fork":false,"url":"https://api.github.com/repos/Tonkpils/snag","forks_url":"https://api.github.com/repos/Tonkpils/snag/forks","keys_url":"https://api.github.com/repos/Tonkpils/snag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tonkpils/snag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tonkpils/snag/teams","hooks_url":"https://api.github.com/repos/Tonkpils/snag/hooks","issue_events_url":"https://api.github.com/repos/Tonkpils/snag/issues/events{/number}","events_url":"https://api.github.com/repos/Tonkpils/snag/events","assignees_url":"https://api.github.com/repos/Tonkpils/snag/assignees{/user}","branches_url":"https://api.github.com/repos/Tonkpils/snag/branches{/branch}","tags_url":"https://api.github.com/repos/Tonkpils/snag/tags","blobs_url":"https://api.github.com/repos/Tonkpils/snag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tonkpils/snag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tonkpils/snag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tonkpils/snag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tonkpils/snag/statuses/{sha}","languages_url":"https://api.github.com/repos/Tonkpils/snag/languages","stargazers_url":"https://api.github.com/repos/Tonkpils/snag/stargazers","contributors_url":"https://api.github.com/repos/Tonkpils/snag/contributors","subscribers_url":"https://api.github.com/repos/Tonkpils/snag/subscribers","subscription_url":"https://api.github.com/repos/Tonkpils/snag/subscription","commits_url":"https://api.github.com/repos/Tonkpils/snag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tonkpils/snag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tonkpils/snag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tonkpils/snag/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tonkpils/snag/contents/{+path}","compare_url":"https://api.github.com/repos/Tonkpils/snag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tonkpils/snag/merges","archive_url":"https://api.github.com/repos/Tonkpils/snag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tonkpils/snag/downloads","issues_url":"https://api.github.com/repos/Tonkpils/snag/issues{/number}","pulls_url":"https://api.github.com/repos/Tonkpils/snag/pulls{/number}","milestones_url":"https://api.github.com/repos/Tonkpils/snag/milestones{/number}","notifications_url":"https://api.github.com/repos/Tonkpils/snag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tonkpils/snag/labels{/name}","releases_url":"https://api.github.com/repos/Tonkpils/snag/releases{/id}","deployments_url":"https://api.github.com/repos/Tonkpils/snag/deployments","created_at":"2015-07-15T18:53:32Z","updated_at":"2016-02-06T05:19:02Z","pushed_at":"2016-03-06T14:54:25Z","git_url":"git://github.com/Tonkpils/snag.git","ssh_url":"git@github.com:Tonkpils/snag.git","clone_url":"https://github.com/Tonkpils/snag.git","svn_url":"https://github.com/Tonkpils/snag","homepage":"","size":1492,"stargazers_count":24,"watchers_count":24,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/61"},"html":{"href":"https://github.com/Tonkpils/snag/pull/61"},"issue":{"href":"https://api.github.com/repos/Tonkpils/snag/issues/61"},"comments":{"href":"https://api.github.com/repos/Tonkpils/snag/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tonkpils/snag/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/Tonkpils/snag/statuses/bc1b6a6c54b8f519a603fad11a3f6a760bbf8674"}}}}