{"action":"created","comment":{"url":"https://api.github.com/repos/apcera/util/pulls/comments/33651352","id":33651352,"diff_hunk":"@@ -0,0 +1,111 @@\n+// Copyright 2014-2015 Apcera Inc. All rights reserved.\n+\n+package docker\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"net/url\"\n+\t\"strings\"\n+)\n+\n+// Mandatory fields for a valid RegistryURL:\n+// Scheme, Host\n+//\n+// Possible formats:\n+// <scheme>://<host>\n+// <scheme>://<host>/<repo>\n+// <scheme>://<host>/<repo>:<tag>\n+// <scheme>://<host>/<namespace>\n+// <scheme>://<host>/<namespace>/<repo>\n+// <scheme>://<host>/<namespace>/<repo>:<tag>\n+// <scheme>://<host>:<port>\n+// <scheme>://<host>:<port>/<repo>\n+// <scheme>://<host>:<port>/<repo>:<tag>\n+// <scheme>://<host>:<port>/<namespace>\n+// <scheme>://<host>:<port>/<namespace>/<repo>\n+// <scheme>://<host>:<port>/<namespace>/<repo>:<tag>\n+\n+type DockerRegistryURL struct {\n+\tScheme    string","path":"docker/registry_url.go","position":30,"original_position":30,"commit_id":"85df479c6f5e30bdff44b4ba93e098a4f901d66a","original_commit_id":"85df479c6f5e30bdff44b4ba93e098a4f901d66a","user":{"login":"alextoombs","id":2731103,"avatar_url":"https://avatars.githubusercontent.com/u/2731103?v=3","gravatar_id":"","url":"https://api.github.com/users/alextoombs","html_url":"https://github.com/alextoombs","followers_url":"https://api.github.com/users/alextoombs/followers","following_url":"https://api.github.com/users/alextoombs/following{/other_user}","gists_url":"https://api.github.com/users/alextoombs/gists{/gist_id}","starred_url":"https://api.github.com/users/alextoombs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextoombs/subscriptions","organizations_url":"https://api.github.com/users/alextoombs/orgs","repos_url":"https://api.github.com/users/alextoombs/repos","events_url":"https://api.github.com/users/alextoombs/events{/privacy}","received_events_url":"https://api.github.com/users/alextoombs/received_events","type":"User","site_admin":false},"body":"I'd recommend embedded a `net.Url` to cover e.g. `Scheme` and `Host` at least. But I just like embedding.","created_at":"2015-07-01T06:19:39Z","updated_at":"2015-07-01T06:19:39Z","html_url":"https://github.com/apcera/util/pull/10#discussion_r33651352","pull_request_url":"https://api.github.com/repos/apcera/util/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/apcera/util/pulls/comments/33651352"},"html":{"href":"https://github.com/apcera/util/pull/10#discussion_r33651352"},"pull_request":{"href":"https://api.github.com/repos/apcera/util/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/apcera/util/pulls/10","id":38947303,"html_url":"https://github.com/apcera/util/pull/10","diff_url":"https://github.com/apcera/util/pull/10.diff","patch_url":"https://github.com/apcera/util/pull/10.patch","issue_url":"https://api.github.com/repos/apcera/util/issues/10","number":10,"state":"open","locked":false,"title":"Added logic to parse Docker Registry URLs.","user":{"login":"jpoler","id":5551484,"avatar_url":"https://avatars.githubusercontent.com/u/5551484?v=3","gravatar_id":"","url":"https://api.github.com/users/jpoler","html_url":"https://github.com/jpoler","followers_url":"https://api.github.com/users/jpoler/followers","following_url":"https://api.github.com/users/jpoler/following{/other_user}","gists_url":"https://api.github.com/users/jpoler/gists{/gist_id}","starred_url":"https://api.github.com/users/jpoler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpoler/subscriptions","organizations_url":"https://api.github.com/users/jpoler/orgs","repos_url":"https://api.github.com/users/jpoler/repos","events_url":"https://api.github.com/users/jpoler/events{/privacy}","received_events_url":"https://api.github.com/users/jpoler/received_events","type":"User","site_admin":false},"body":"WIP: May need to add more functionality.\r\n\r\nSigned-off-by: Jon Poler <jonathan.poler@apcera.com>","created_at":"2015-07-01T04:25:42Z","updated_at":"2015-07-01T06:19:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d38eb792a6d267d5d0e97cff712816f937a2e9e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apcera/util/pulls/10/commits","review_comments_url":"https://api.github.com/repos/apcera/util/pulls/10/comments","review_comment_url":"https://api.github.com/repos/apcera/util/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apcera/util/issues/10/comments","statuses_url":"https://api.github.com/repos/apcera/util/statuses/85df479c6f5e30bdff44b4ba93e098a4f901d66a","head":{"label":"apcera:docker-source-policy-take2","ref":"docker-source-policy-take2","sha":"85df479c6f5e30bdff44b4ba93e098a4f901d66a","user":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"repo":{"id":35003310,"name":"util","full_name":"apcera/util","owner":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apcera/util","description":"Apcera Util","fork":false,"url":"https://api.github.com/repos/apcera/util","forks_url":"https://api.github.com/repos/apcera/util/forks","keys_url":"https://api.github.com/repos/apcera/util/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apcera/util/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apcera/util/teams","hooks_url":"https://api.github.com/repos/apcera/util/hooks","issue_events_url":"https://api.github.com/repos/apcera/util/issues/events{/number}","events_url":"https://api.github.com/repos/apcera/util/events","assignees_url":"https://api.github.com/repos/apcera/util/assignees{/user}","branches_url":"https://api.github.com/repos/apcera/util/branches{/branch}","tags_url":"https://api.github.com/repos/apcera/util/tags","blobs_url":"https://api.github.com/repos/apcera/util/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apcera/util/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apcera/util/git/refs{/sha}","trees_url":"https://api.github.com/repos/apcera/util/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apcera/util/statuses/{sha}","languages_url":"https://api.github.com/repos/apcera/util/languages","stargazers_url":"https://api.github.com/repos/apcera/util/stargazers","contributors_url":"https://api.github.com/repos/apcera/util/contributors","subscribers_url":"https://api.github.com/repos/apcera/util/subscribers","subscription_url":"https://api.github.com/repos/apcera/util/subscription","commits_url":"https://api.github.com/repos/apcera/util/commits{/sha}","git_commits_url":"https://api.github.com/repos/apcera/util/git/commits{/sha}","comments_url":"https://api.github.com/repos/apcera/util/comments{/number}","issue_comment_url":"https://api.github.com/repos/apcera/util/issues/comments{/number}","contents_url":"https://api.github.com/repos/apcera/util/contents/{+path}","compare_url":"https://api.github.com/repos/apcera/util/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apcera/util/merges","archive_url":"https://api.github.com/repos/apcera/util/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apcera/util/downloads","issues_url":"https://api.github.com/repos/apcera/util/issues{/number}","pulls_url":"https://api.github.com/repos/apcera/util/pulls{/number}","milestones_url":"https://api.github.com/repos/apcera/util/milestones{/number}","notifications_url":"https://api.github.com/repos/apcera/util/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apcera/util/labels{/name}","releases_url":"https://api.github.com/repos/apcera/util/releases{/id}","created_at":"2015-05-03T22:41:32Z","updated_at":"2015-05-08T18:15:11Z","pushed_at":"2015-07-01T04:25:42Z","git_url":"git://github.com/apcera/util.git","ssh_url":"git@github.com:apcera/util.git","clone_url":"https://github.com/apcera/util.git","svn_url":"https://github.com/apcera/util","homepage":null,"size":614,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"apcera:master","ref":"master","sha":"0c391f10f84eeb6b9127a7b346327ea11eb599f6","user":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"repo":{"id":35003310,"name":"util","full_name":"apcera/util","owner":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apcera/util","description":"Apcera Util","fork":false,"url":"https://api.github.com/repos/apcera/util","forks_url":"https://api.github.com/repos/apcera/util/forks","keys_url":"https://api.github.com/repos/apcera/util/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apcera/util/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apcera/util/teams","hooks_url":"https://api.github.com/repos/apcera/util/hooks","issue_events_url":"https://api.github.com/repos/apcera/util/issues/events{/number}","events_url":"https://api.github.com/repos/apcera/util/events","assignees_url":"https://api.github.com/repos/apcera/util/assignees{/user}","branches_url":"https://api.github.com/repos/apcera/util/branches{/branch}","tags_url":"https://api.github.com/repos/apcera/util/tags","blobs_url":"https://api.github.com/repos/apcera/util/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apcera/util/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apcera/util/git/refs{/sha}","trees_url":"https://api.github.com/repos/apcera/util/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apcera/util/statuses/{sha}","languages_url":"https://api.github.com/repos/apcera/util/languages","stargazers_url":"https://api.github.com/repos/apcera/util/stargazers","contributors_url":"https://api.github.com/repos/apcera/util/contributors","subscribers_url":"https://api.github.com/repos/apcera/util/subscribers","subscription_url":"https://api.github.com/repos/apcera/util/subscription","commits_url":"https://api.github.com/repos/apcera/util/commits{/sha}","git_commits_url":"https://api.github.com/repos/apcera/util/git/commits{/sha}","comments_url":"https://api.github.com/repos/apcera/util/comments{/number}","issue_comment_url":"https://api.github.com/repos/apcera/util/issues/comments{/number}","contents_url":"https://api.github.com/repos/apcera/util/contents/{+path}","compare_url":"https://api.github.com/repos/apcera/util/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apcera/util/merges","archive_url":"https://api.github.com/repos/apcera/util/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apcera/util/downloads","issues_url":"https://api.github.com/repos/apcera/util/issues{/number}","pulls_url":"https://api.github.com/repos/apcera/util/pulls{/number}","milestones_url":"https://api.github.com/repos/apcera/util/milestones{/number}","notifications_url":"https://api.github.com/repos/apcera/util/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apcera/util/labels{/name}","releases_url":"https://api.github.com/repos/apcera/util/releases{/id}","created_at":"2015-05-03T22:41:32Z","updated_at":"2015-05-08T18:15:11Z","pushed_at":"2015-07-01T04:25:42Z","git_url":"git://github.com/apcera/util.git","ssh_url":"git@github.com:apcera/util.git","clone_url":"https://github.com/apcera/util.git","svn_url":"https://github.com/apcera/util","homepage":null,"size":614,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apcera/util/pulls/10"},"html":{"href":"https://github.com/apcera/util/pull/10"},"issue":{"href":"https://api.github.com/repos/apcera/util/issues/10"},"comments":{"href":"https://api.github.com/repos/apcera/util/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/apcera/util/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/apcera/util/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apcera/util/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/apcera/util/statuses/85df479c6f5e30bdff44b4ba93e098a4f901d66a"}}}}