{"action":"created","comment":{"url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/comments/30850793","id":30850793,"diff_hunk":"@@ -18,20 +21,46 @@ type user struct {\n \tPhone string\n }\n \n-// users is a slice of users.\n-var users []user\n+var (\n+\t// mu protects users.\n+\tmu sync.RWMutex\n+\t// initialize users, so that the output JSON won't be null\n+\t// prior to adding users.\n+\tusers = make([]user, 0)\n+)\n+\n+// index page template\n+var IdxTpl = template.Must(template.ParseFiles(\"template/index.html\"))\n+\n+// file server for any future assets and other static files","path":"12-http/example3/main.go","position":29,"original_position":29,"commit_id":"be854b24bfa31af0269c243aaba75baef83ace7c","original_commit_id":"be854b24bfa31af0269c243aaba75baef83ace7c","user":{"login":"extemporalgenome","id":536740,"avatar_url":"https://avatars.githubusercontent.com/u/536740?v=3","gravatar_id":"","url":"https://api.github.com/users/extemporalgenome","html_url":"https://github.com/extemporalgenome","followers_url":"https://api.github.com/users/extemporalgenome/followers","following_url":"https://api.github.com/users/extemporalgenome/following{/other_user}","gists_url":"https://api.github.com/users/extemporalgenome/gists{/gist_id}","starred_url":"https://api.github.com/users/extemporalgenome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/extemporalgenome/subscriptions","organizations_url":"https://api.github.com/users/extemporalgenome/orgs","repos_url":"https://api.github.com/users/extemporalgenome/repos","events_url":"https://api.github.com/users/extemporalgenome/events{/privacy}","received_events_url":"https://api.github.com/users/extemporalgenome/received_events","type":"User","site_admin":false},"body":"\"represents\" is generally a word used in type declaration doc comments. I'll use the word \"is\".","created_at":"2015-05-21T21:41:08Z","updated_at":"2015-05-21T21:41:08Z","html_url":"https://github.com/ArdanStudios/gotraining/pull/28#discussion_r30850793","pull_request_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/comments/30850793"},"html":{"href":"https://github.com/ArdanStudios/gotraining/pull/28#discussion_r30850793"},"pull_request":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28","id":35970624,"html_url":"https://github.com/ArdanStudios/gotraining/pull/28","diff_url":"https://github.com/ArdanStudios/gotraining/pull/28.diff","patch_url":"https://github.com/ArdanStudios/gotraining/pull/28.patch","issue_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/28","number":28,"state":"open","locked":false,"title":"http example3: explicit mux provides real value","user":{"login":"extemporalgenome","id":536740,"avatar_url":"https://avatars.githubusercontent.com/u/536740?v=3","gravatar_id":"","url":"https://api.github.com/users/extemporalgenome","html_url":"https://github.com/extemporalgenome","followers_url":"https://api.github.com/users/extemporalgenome/followers","following_url":"https://api.github.com/users/extemporalgenome/following{/other_user}","gists_url":"https://api.github.com/users/extemporalgenome/gists{/gist_id}","starred_url":"https://api.github.com/users/extemporalgenome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/extemporalgenome/subscriptions","organizations_url":"https://api.github.com/users/extemporalgenome/orgs","repos_url":"https://api.github.com/users/extemporalgenome/repos","events_url":"https://api.github.com/users/extemporalgenome/events{/privacy}","received_events_url":"https://api.github.com/users/extemporalgenome/received_events","type":"User","site_admin":false},"body":"- explicit mux use now provides value over default mux.\r\n- users slice protected by RWMutex -- avoids previous race.\r\n- full (but short) web 1.0 example; easily changed into SPA.","created_at":"2015-05-21T19:51:00Z","updated_at":"2015-05-21T21:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc757cf52f643e6844a0817b324a84bde42cdb9a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28/commits","review_comments_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28/comments","review_comment_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/28/comments","statuses_url":"https://api.github.com/repos/ArdanStudios/gotraining/statuses/be854b24bfa31af0269c243aaba75baef83ace7c","head":{"label":"ArdanStudios:reworked-http-explicit-mux","ref":"reworked-http-explicit-mux","sha":"be854b24bfa31af0269c243aaba75baef83ace7c","user":{"login":"ArdanStudios","id":2280011,"avatar_url":"https://avatars.githubusercontent.com/u/2280011?v=3","gravatar_id":"","url":"https://api.github.com/users/ArdanStudios","html_url":"https://github.com/ArdanStudios","followers_url":"https://api.github.com/users/ArdanStudios/followers","following_url":"https://api.github.com/users/ArdanStudios/following{/other_user}","gists_url":"https://api.github.com/users/ArdanStudios/gists{/gist_id}","starred_url":"https://api.github.com/users/ArdanStudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArdanStudios/subscriptions","organizations_url":"https://api.github.com/users/ArdanStudios/orgs","repos_url":"https://api.github.com/users/ArdanStudios/repos","events_url":"https://api.github.com/users/ArdanStudios/events{/privacy}","received_events_url":"https://api.github.com/users/ArdanStudios/received_events","type":"Organization","site_admin":false},"repo":{"id":21405028,"name":"gotraining","full_name":"ArdanStudios/gotraining","owner":{"login":"ArdanStudios","id":2280011,"avatar_url":"https://avatars.githubusercontent.com/u/2280011?v=3","gravatar_id":"","url":"https://api.github.com/users/ArdanStudios","html_url":"https://github.com/ArdanStudios","followers_url":"https://api.github.com/users/ArdanStudios/followers","following_url":"https://api.github.com/users/ArdanStudios/following{/other_user}","gists_url":"https://api.github.com/users/ArdanStudios/gists{/gist_id}","starred_url":"https://api.github.com/users/ArdanStudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArdanStudios/subscriptions","organizations_url":"https://api.github.com/users/ArdanStudios/orgs","repos_url":"https://api.github.com/users/ArdanStudios/repos","events_url":"https://api.github.com/users/ArdanStudios/events{/privacy}","received_events_url":"https://api.github.com/users/ArdanStudios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArdanStudios/gotraining","description":"Hardcore Go Training Class Material : ","fork":false,"url":"https://api.github.com/repos/ArdanStudios/gotraining","forks_url":"https://api.github.com/repos/ArdanStudios/gotraining/forks","keys_url":"https://api.github.com/repos/ArdanStudios/gotraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArdanStudios/gotraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArdanStudios/gotraining/teams","hooks_url":"https://api.github.com/repos/ArdanStudios/gotraining/hooks","issue_events_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/events{/number}","events_url":"https://api.github.com/repos/ArdanStudios/gotraining/events","assignees_url":"https://api.github.com/repos/ArdanStudios/gotraining/assignees{/user}","branches_url":"https://api.github.com/repos/ArdanStudios/gotraining/branches{/branch}","tags_url":"https://api.github.com/repos/ArdanStudios/gotraining/tags","blobs_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArdanStudios/gotraining/statuses/{sha}","languages_url":"https://api.github.com/repos/ArdanStudios/gotraining/languages","stargazers_url":"https://api.github.com/repos/ArdanStudios/gotraining/stargazers","contributors_url":"https://api.github.com/repos/ArdanStudios/gotraining/contributors","subscribers_url":"https://api.github.com/repos/ArdanStudios/gotraining/subscribers","subscription_url":"https://api.github.com/repos/ArdanStudios/gotraining/subscription","commits_url":"https://api.github.com/repos/ArdanStudios/gotraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArdanStudios/gotraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArdanStudios/gotraining/contents/{+path}","compare_url":"https://api.github.com/repos/ArdanStudios/gotraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArdanStudios/gotraining/merges","archive_url":"https://api.github.com/repos/ArdanStudios/gotraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArdanStudios/gotraining/downloads","issues_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues{/number}","pulls_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls{/number}","milestones_url":"https://api.github.com/repos/ArdanStudios/gotraining/milestones{/number}","notifications_url":"https://api.github.com/repos/ArdanStudios/gotraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArdanStudios/gotraining/labels{/name}","releases_url":"https://api.github.com/repos/ArdanStudios/gotraining/releases{/id}","created_at":"2014-07-01T23:12:46Z","updated_at":"2015-05-21T15:47:22Z","pushed_at":"2015-05-21T20:07:58Z","git_url":"git://github.com/ArdanStudios/gotraining.git","ssh_url":"git@github.com:ArdanStudios/gotraining.git","clone_url":"https://github.com/ArdanStudios/gotraining.git","svn_url":"https://github.com/ArdanStudios/gotraining","homepage":"http://www.ArdanLabs.com","size":24754,"stargazers_count":416,"watchers_count":416,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":1,"forks":79,"open_issues":1,"watchers":416,"default_branch":"master"}},"base":{"label":"ArdanStudios:master","ref":"master","sha":"081f59f42926fd05c22bd2c543dd674f9feffc65","user":{"login":"ArdanStudios","id":2280011,"avatar_url":"https://avatars.githubusercontent.com/u/2280011?v=3","gravatar_id":"","url":"https://api.github.com/users/ArdanStudios","html_url":"https://github.com/ArdanStudios","followers_url":"https://api.github.com/users/ArdanStudios/followers","following_url":"https://api.github.com/users/ArdanStudios/following{/other_user}","gists_url":"https://api.github.com/users/ArdanStudios/gists{/gist_id}","starred_url":"https://api.github.com/users/ArdanStudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArdanStudios/subscriptions","organizations_url":"https://api.github.com/users/ArdanStudios/orgs","repos_url":"https://api.github.com/users/ArdanStudios/repos","events_url":"https://api.github.com/users/ArdanStudios/events{/privacy}","received_events_url":"https://api.github.com/users/ArdanStudios/received_events","type":"Organization","site_admin":false},"repo":{"id":21405028,"name":"gotraining","full_name":"ArdanStudios/gotraining","owner":{"login":"ArdanStudios","id":2280011,"avatar_url":"https://avatars.githubusercontent.com/u/2280011?v=3","gravatar_id":"","url":"https://api.github.com/users/ArdanStudios","html_url":"https://github.com/ArdanStudios","followers_url":"https://api.github.com/users/ArdanStudios/followers","following_url":"https://api.github.com/users/ArdanStudios/following{/other_user}","gists_url":"https://api.github.com/users/ArdanStudios/gists{/gist_id}","starred_url":"https://api.github.com/users/ArdanStudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArdanStudios/subscriptions","organizations_url":"https://api.github.com/users/ArdanStudios/orgs","repos_url":"https://api.github.com/users/ArdanStudios/repos","events_url":"https://api.github.com/users/ArdanStudios/events{/privacy}","received_events_url":"https://api.github.com/users/ArdanStudios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArdanStudios/gotraining","description":"Hardcore Go Training Class Material : ","fork":false,"url":"https://api.github.com/repos/ArdanStudios/gotraining","forks_url":"https://api.github.com/repos/ArdanStudios/gotraining/forks","keys_url":"https://api.github.com/repos/ArdanStudios/gotraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArdanStudios/gotraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArdanStudios/gotraining/teams","hooks_url":"https://api.github.com/repos/ArdanStudios/gotraining/hooks","issue_events_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/events{/number}","events_url":"https://api.github.com/repos/ArdanStudios/gotraining/events","assignees_url":"https://api.github.com/repos/ArdanStudios/gotraining/assignees{/user}","branches_url":"https://api.github.com/repos/ArdanStudios/gotraining/branches{/branch}","tags_url":"https://api.github.com/repos/ArdanStudios/gotraining/tags","blobs_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArdanStudios/gotraining/statuses/{sha}","languages_url":"https://api.github.com/repos/ArdanStudios/gotraining/languages","stargazers_url":"https://api.github.com/repos/ArdanStudios/gotraining/stargazers","contributors_url":"https://api.github.com/repos/ArdanStudios/gotraining/contributors","subscribers_url":"https://api.github.com/repos/ArdanStudios/gotraining/subscribers","subscription_url":"https://api.github.com/repos/ArdanStudios/gotraining/subscription","commits_url":"https://api.github.com/repos/ArdanStudios/gotraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArdanStudios/gotraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArdanStudios/gotraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArdanStudios/gotraining/contents/{+path}","compare_url":"https://api.github.com/repos/ArdanStudios/gotraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArdanStudios/gotraining/merges","archive_url":"https://api.github.com/repos/ArdanStudios/gotraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArdanStudios/gotraining/downloads","issues_url":"https://api.github.com/repos/ArdanStudios/gotraining/issues{/number}","pulls_url":"https://api.github.com/repos/ArdanStudios/gotraining/pulls{/number}","milestones_url":"https://api.github.com/repos/ArdanStudios/gotraining/milestones{/number}","notifications_url":"https://api.github.com/repos/ArdanStudios/gotraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArdanStudios/gotraining/labels{/name}","releases_url":"https://api.github.com/repos/ArdanStudios/gotraining/releases{/id}","created_at":"2014-07-01T23:12:46Z","updated_at":"2015-05-21T15:47:22Z","pushed_at":"2015-05-21T20:07:58Z","git_url":"git://github.com/ArdanStudios/gotraining.git","ssh_url":"git@github.com:ArdanStudios/gotraining.git","clone_url":"https://github.com/ArdanStudios/gotraining.git","svn_url":"https://github.com/ArdanStudios/gotraining","homepage":"http://www.ArdanLabs.com","size":24754,"stargazers_count":416,"watchers_count":416,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":1,"forks":79,"open_issues":1,"watchers":416,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28"},"html":{"href":"https://github.com/ArdanStudios/gotraining/pull/28"},"issue":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/issues/28"},"comments":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/ArdanStudios/gotraining/statuses/be854b24bfa31af0269c243aaba75baef83ace7c"}}}}