{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/61095849","id":61095849,"diff_hunk":"@@ -17,20 +17,28 @@ limitations under the License.\n package validation\n \n import (\n+\t\"fmt\"\n \t\"math\"\n \t\"net\"\n \t\"regexp\"\n+\t\"strconv\"\n \t\"strings\"\n )\n \n const qnameCharFmt string = \"[A-Za-z0-9]\"\n const qnameExtCharFmt string = \"[-A-Za-z0-9_.]\"\n-const QualifiedNameFmt string = \"(\" + qnameCharFmt + qnameExtCharFmt + \"*)?\" + qnameCharFmt\n-const QualifiedNameMaxLength int = 63\n-\n-var qualifiedNameRegexp = regexp.MustCompile(\"^\" + QualifiedNameFmt + \"$\")\n-\n-func IsQualifiedName(value string) bool {\n+const qualifiedNameFmt string = \"(\" + qnameCharFmt + qnameExtCharFmt + \"*)?\" + qnameCharFmt","path":"pkg/util/validation/validation.go","position":20,"original_position":20,"commit_id":"72fcb68d932db71f0ee74e1209c167c05c41d798","original_commit_id":"72fcb68d932db71f0ee74e1209c167c05c41d798","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"> These were public because they are being used by downstream code not in this package to present consistent messages. and values. I'm not sure hiding them still allows that - @deads2k\r\n\r\nwith the string slice returned below, I think we'll be ok.","created_at":"2016-04-26T14:30:47Z","updated_at":"2016-04-26T14:30:47Z","html_url":"https://github.com/kubernetes/kubernetes/pull/24798#discussion_r61095849","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/61095849"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/24798#discussion_r61095849"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798","id":67891245,"html_url":"https://github.com/kubernetes/kubernetes/pull/24798","diff_url":"https://github.com/kubernetes/kubernetes/pull/24798.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/24798.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24798","number":24798,"state":"open","locked":false,"title":"Make IsQualifiedName return error strings","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"Part of the larger validation PR, broken out for easier review and merge.\r\n\r\n@lavalamp FYI, but I know you're swamped, too.","created_at":"2016-04-26T14:03:44Z","updated_at":"2016-04-26T14:30:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ca9830bd36c54d43db883031d198aae73febb59","assignee":{"login":"krousey","id":157083,"avatar_url":"https://avatars.githubusercontent.com/u/157083?v=3","gravatar_id":"","url":"https://api.github.com/users/krousey","html_url":"https://github.com/krousey","followers_url":"https://api.github.com/users/krousey/followers","following_url":"https://api.github.com/users/krousey/following{/other_user}","gists_url":"https://api.github.com/users/krousey/gists{/gist_id}","starred_url":"https://api.github.com/users/krousey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krousey/subscriptions","organizations_url":"https://api.github.com/users/krousey/orgs","repos_url":"https://api.github.com/users/krousey/repos","events_url":"https://api.github.com/users/krousey/events{/privacy}","received_events_url":"https://api.github.com/users/krousey/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24798/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/72fcb68d932db71f0ee74e1209c167c05c41d798","head":{"label":"thockin:validation_pt8-1","ref":"validation_pt8-1","sha":"72fcb68d932db71f0ee74e1209c167c05c41d798","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"repo":{"id":21042716,"name":"kubernetes","full_name":"thockin/kubernetes","owner":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thockin/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/thockin/kubernetes","forks_url":"https://api.github.com/repos/thockin/kubernetes/forks","keys_url":"https://api.github.com/repos/thockin/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thockin/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thockin/kubernetes/teams","hooks_url":"https://api.github.com/repos/thockin/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/thockin/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/thockin/kubernetes/events","assignees_url":"https://api.github.com/repos/thockin/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/thockin/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/thockin/kubernetes/tags","blobs_url":"https://api.github.com/repos/thockin/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thockin/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thockin/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/thockin/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thockin/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/thockin/kubernetes/languages","stargazers_url":"https://api.github.com/repos/thockin/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/thockin/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/thockin/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/thockin/kubernetes/subscription","commits_url":"https://api.github.com/repos/thockin/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/thockin/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/thockin/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/thockin/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/thockin/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/thockin/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thockin/kubernetes/merges","archive_url":"https://api.github.com/repos/thockin/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thockin/kubernetes/downloads","issues_url":"https://api.github.com/repos/thockin/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/thockin/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/thockin/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/thockin/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thockin/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/thockin/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/thockin/kubernetes/deployments","created_at":"2014-06-20T15:30:28Z","updated_at":"2016-03-29T02:12:52Z","pushed_at":"2016-04-26T14:00:51Z","git_url":"git://github.com/thockin/kubernetes.git","ssh_url":"git@github.com:thockin/kubernetes.git","clone_url":"https://github.com/thockin/kubernetes.git","svn_url":"https://github.com/thockin/kubernetes","homepage":null,"size":201752,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"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":2,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"9db45590cfaa0ae5cb658e49b70e443324b2d6c7","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-04-26T14:16:38Z","pushed_at":"2016-04-26T14:26:20Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":386347,"stargazers_count":14073,"watchers_count":14073,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4174,"mirror_url":null,"open_issues_count":3467,"forks":4174,"open_issues":3467,"watchers":14073,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/24798"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/24798"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/24798/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24798/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/72fcb68d932db71f0ee74e1209c167c05c41d798"}}}}