{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/139876927","pull_request_review_id":63868704,"id":139876927,"diff_hunk":"@@ -156,10 +156,10 @@ func (o *CanIOptions) Complete(f cmdutil.Factory, args []string) error {\n func (o *CanIOptions) Validate() error {\n \tif o.NonResourceURL != \"\" {\n \t\tif o.Subresource != \"\" {\n-\t\t\treturn fmt.Errorf(\"--subresource can not be used with nonResourceURL\")\n+\t\t\treturn fmt.Errorf(\"--subresource can not be used with NonResourceURL\")\n \t\t}\n \t\tif o.Resource != (schema.GroupVersionResource{}) || o.ResourceName != \"\" {\n-\t\t\treturn fmt.Errorf(\"nonResourceURL and Resource can not specified together\")\n+\t\t\treturn fmt.Errorf(\"NonResourceURL and ResourceName can not specified together\")","path":"pkg/kubectl/cmd/auth/cani.go","position":9,"original_position":9,"commit_id":"6bffee6b3fff815a6952fbb9d9ac80412981a438","original_commit_id":"6bffee6b3fff815a6952fbb9d9ac80412981a438","user":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"body":"https://github.com/golang/go/wiki/CodeReviewComments#error-strings","created_at":"2017-09-20T05:16:22Z","updated_at":"2017-09-20T05:16:22Z","html_url":"https://github.com/kubernetes/kubernetes/pull/52761#discussion_r139876927","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/139876927"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/52761#discussion_r139876927"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761","id":142004084,"html_url":"https://github.com/kubernetes/kubernetes/pull/52761","diff_url":"https://github.com/kubernetes/kubernetes/pull/52761.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/52761.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52761","number":52761,"state":"open","locked":false,"title":"Adjust the validating messages","user":{"login":"yuexiao-wang","id":20082558,"avatar_url":"https://avatars3.githubusercontent.com/u/20082558?v=4","gravatar_id":"","url":"https://api.github.com/users/yuexiao-wang","html_url":"https://github.com/yuexiao-wang","followers_url":"https://api.github.com/users/yuexiao-wang/followers","following_url":"https://api.github.com/users/yuexiao-wang/following{/other_user}","gists_url":"https://api.github.com/users/yuexiao-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/yuexiao-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuexiao-wang/subscriptions","organizations_url":"https://api.github.com/users/yuexiao-wang/orgs","repos_url":"https://api.github.com/users/yuexiao-wang/repos","events_url":"https://api.github.com/users/yuexiao-wang/events{/privacy}","received_events_url":"https://api.github.com/users/yuexiao-wang/received_events","type":"User","site_admin":false},"body":"Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>\r\n\r\n**What this PR does / why we need it**:\r\n1.  Adjust the validating messages for user understanding \r\n2.  Add error messages for easliy testing.\r\n3.  Optimize the  code for switch case.\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2017-09-20T03:39:48Z","updated_at":"2017-09-20T05:16:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd4556ba229cf9afc118a3e102b087be58b17c8c","assignee":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars0.githubusercontent.com/u/158611?v=4","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"assignees":[{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars0.githubusercontent.com/u/158611?v=4","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52761/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6bffee6b3fff815a6952fbb9d9ac80412981a438","head":{"label":"yuexiao-wang:validate-message","ref":"validate-message","sha":"6bffee6b3fff815a6952fbb9d9ac80412981a438","user":{"login":"yuexiao-wang","id":20082558,"avatar_url":"https://avatars3.githubusercontent.com/u/20082558?v=4","gravatar_id":"","url":"https://api.github.com/users/yuexiao-wang","html_url":"https://github.com/yuexiao-wang","followers_url":"https://api.github.com/users/yuexiao-wang/followers","following_url":"https://api.github.com/users/yuexiao-wang/following{/other_user}","gists_url":"https://api.github.com/users/yuexiao-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/yuexiao-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuexiao-wang/subscriptions","organizations_url":"https://api.github.com/users/yuexiao-wang/orgs","repos_url":"https://api.github.com/users/yuexiao-wang/repos","events_url":"https://api.github.com/users/yuexiao-wang/events{/privacy}","received_events_url":"https://api.github.com/users/yuexiao-wang/received_events","type":"User","site_admin":false},"repo":{"id":102179824,"name":"kubernetes","full_name":"yuexiao-wang/kubernetes","owner":{"login":"yuexiao-wang","id":20082558,"avatar_url":"https://avatars3.githubusercontent.com/u/20082558?v=4","gravatar_id":"","url":"https://api.github.com/users/yuexiao-wang","html_url":"https://github.com/yuexiao-wang","followers_url":"https://api.github.com/users/yuexiao-wang/followers","following_url":"https://api.github.com/users/yuexiao-wang/following{/other_user}","gists_url":"https://api.github.com/users/yuexiao-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/yuexiao-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuexiao-wang/subscriptions","organizations_url":"https://api.github.com/users/yuexiao-wang/orgs","repos_url":"https://api.github.com/users/yuexiao-wang/repos","events_url":"https://api.github.com/users/yuexiao-wang/events{/privacy}","received_events_url":"https://api.github.com/users/yuexiao-wang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuexiao-wang/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/yuexiao-wang/kubernetes","forks_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/forks","keys_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/teams","hooks_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/events","assignees_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/tags","blobs_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/languages","stargazers_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/subscription","commits_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/merges","archive_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/downloads","issues_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/yuexiao-wang/kubernetes/deployments","created_at":"2017-09-02T07:14:24Z","updated_at":"2017-09-02T07:15:04Z","pushed_at":"2017-09-20T03:17:41Z","git_url":"git://github.com/yuexiao-wang/kubernetes.git","ssh_url":"git@github.com:yuexiao-wang/kubernetes.git","clone_url":"https://github.com/yuexiao-wang/kubernetes.git","svn_url":"https://github.com/yuexiao-wang/kubernetes","homepage":"http://kubernetes.io","size":475944,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"9a7818a2e0200557e7dcdbe3701daf186a58faad","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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://avatars2.githubusercontent.com/u/13629408?v=4","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":"Production-Grade Container Scheduling and Management","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":"2017-09-20T05:02:26Z","pushed_at":"2017-09-20T04:45:16Z","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":694943,"stargazers_count":26959,"watchers_count":26959,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9655,"mirror_url":null,"open_issues_count":5537,"forks":9655,"open_issues":5537,"watchers":26959,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/52761"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/52761"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/52761/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52761/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6bffee6b3fff815a6952fbb9d9ac80412981a438"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shiywang"}}