{"action":"created","comment":{"url":"https://api.github.com/repos/containers/virtcontainers/pulls/comments/130657444","pull_request_review_id":53558076,"id":130657444,"diff_hunk":"@@ -201,6 +203,25 @@ func serializeParams(params []Param, delim string) []string {\n \treturn parameters\n }\n \n+// DeserializeParams converts []string to []Param\n+func DeserializeParams(parameters []string) []Param {\n+\tvar params []Param\n+\n+\tfor _, param := range parameters {\n+\t\tif param == \"\" {\n+\t\t\tcontinue\n+\t\t}\n+\t\tp := strings.SplitN(param, \"=\", 2)\n+\t\tif len(p) == 2 {\n+\t\t\tparams = append(params, Param{Key: p[0], Value: p[1]})\n+\t\t} else if len(p) == 1 {\n+\t\t\tparams = append(params, Param{Key: p[0], Value: \"\"})\n+\t\t}","path":"hypervisor.go","position":35,"original_position":35,"commit_id":"da51dd44b9648aa83145b323cd2636e2f5ce9292","original_commit_id":"da51dd44b9648aa83145b323cd2636e2f5ce9292","user":{"login":"wcwxyz","id":1259532,"avatar_url":"https://avatars3.githubusercontent.com/u/1259532?v=4","gravatar_id":"","url":"https://api.github.com/users/wcwxyz","html_url":"https://github.com/wcwxyz","followers_url":"https://api.github.com/users/wcwxyz/followers","following_url":"https://api.github.com/users/wcwxyz/following{/other_user}","gists_url":"https://api.github.com/users/wcwxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/wcwxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcwxyz/subscriptions","organizations_url":"https://api.github.com/users/wcwxyz/orgs","repos_url":"https://api.github.com/users/wcwxyz/repos","events_url":"https://api.github.com/users/wcwxyz/events{/privacy}","received_events_url":"https://api.github.com/users/wcwxyz/received_events","type":"User","site_admin":false},"body":"Thanks for review.\r\n\r\nAfter strings.SplitN(param, \"=\", 2), len(p) is either 1 or 2. So another else statement seems like unnecessary. Correct me if I'm wrong.","created_at":"2017-08-01T16:29:49Z","updated_at":"2017-08-01T16:29:49Z","html_url":"https://github.com/containers/virtcontainers/pull/326#discussion_r130657444","pull_request_url":"https://api.github.com/repos/containers/virtcontainers/pulls/326","_links":{"self":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/comments/130657444"},"html":{"href":"https://github.com/containers/virtcontainers/pull/326#discussion_r130657444"},"pull_request":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/containers/virtcontainers/pulls/326","id":133435449,"html_url":"https://github.com/containers/virtcontainers/pull/326","diff_url":"https://github.com/containers/virtcontainers/pull/326.diff","patch_url":"https://github.com/containers/virtcontainers/pull/326.patch","issue_url":"https://api.github.com/repos/containers/virtcontainers/issues/326","number":326,"state":"open","locked":false,"title":"hypervisor: export SerializeParams and DeserializeParams","user":{"login":"wcwxyz","id":1259532,"avatar_url":"https://avatars3.githubusercontent.com/u/1259532?v=4","gravatar_id":"","url":"https://api.github.com/users/wcwxyz","html_url":"https://github.com/wcwxyz","followers_url":"https://api.github.com/users/wcwxyz/followers","following_url":"https://api.github.com/users/wcwxyz/following{/other_user}","gists_url":"https://api.github.com/users/wcwxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/wcwxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcwxyz/subscriptions","organizations_url":"https://api.github.com/users/wcwxyz/orgs","repos_url":"https://api.github.com/users/wcwxyz/repos","events_url":"https://api.github.com/users/wcwxyz/events{/privacy}","received_events_url":"https://api.github.com/users/wcwxyz/received_events","type":"User","site_admin":false},"body":"Add an exported function DeserializeParams(), and export\r\nSerializeParams().\r\n\r\nThis patch is laying the ground work for [https://github.com/clearcontainers/runtime/pull/369](url)","created_at":"2017-08-01T10:08:43Z","updated_at":"2017-08-01T16:29:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a26ec917f39a9b43c70b4da99bc4fbf17f94ec62","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/containers/virtcontainers/pulls/326/commits","review_comments_url":"https://api.github.com/repos/containers/virtcontainers/pulls/326/comments","review_comment_url":"https://api.github.com/repos/containers/virtcontainers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containers/virtcontainers/issues/326/comments","statuses_url":"https://api.github.com/repos/containers/virtcontainers/statuses/da51dd44b9648aa83145b323cd2636e2f5ce9292","head":{"label":"wcwxyz:make-serializeParams-global","ref":"make-serializeParams-global","sha":"da51dd44b9648aa83145b323cd2636e2f5ce9292","user":{"login":"wcwxyz","id":1259532,"avatar_url":"https://avatars3.githubusercontent.com/u/1259532?v=4","gravatar_id":"","url":"https://api.github.com/users/wcwxyz","html_url":"https://github.com/wcwxyz","followers_url":"https://api.github.com/users/wcwxyz/followers","following_url":"https://api.github.com/users/wcwxyz/following{/other_user}","gists_url":"https://api.github.com/users/wcwxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/wcwxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcwxyz/subscriptions","organizations_url":"https://api.github.com/users/wcwxyz/orgs","repos_url":"https://api.github.com/users/wcwxyz/repos","events_url":"https://api.github.com/users/wcwxyz/events{/privacy}","received_events_url":"https://api.github.com/users/wcwxyz/received_events","type":"User","site_admin":false},"repo":{"id":76419531,"name":"virtcontainers","full_name":"wcwxyz/virtcontainers","owner":{"login":"wcwxyz","id":1259532,"avatar_url":"https://avatars3.githubusercontent.com/u/1259532?v=4","gravatar_id":"","url":"https://api.github.com/users/wcwxyz","html_url":"https://github.com/wcwxyz","followers_url":"https://api.github.com/users/wcwxyz/followers","following_url":"https://api.github.com/users/wcwxyz/following{/other_user}","gists_url":"https://api.github.com/users/wcwxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/wcwxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcwxyz/subscriptions","organizations_url":"https://api.github.com/users/wcwxyz/orgs","repos_url":"https://api.github.com/users/wcwxyz/repos","events_url":"https://api.github.com/users/wcwxyz/events{/privacy}","received_events_url":"https://api.github.com/users/wcwxyz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wcwxyz/virtcontainers","description":"A Go package for building hardware virtualized container runtimes","fork":true,"url":"https://api.github.com/repos/wcwxyz/virtcontainers","forks_url":"https://api.github.com/repos/wcwxyz/virtcontainers/forks","keys_url":"https://api.github.com/repos/wcwxyz/virtcontainers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wcwxyz/virtcontainers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wcwxyz/virtcontainers/teams","hooks_url":"https://api.github.com/repos/wcwxyz/virtcontainers/hooks","issue_events_url":"https://api.github.com/repos/wcwxyz/virtcontainers/issues/events{/number}","events_url":"https://api.github.com/repos/wcwxyz/virtcontainers/events","assignees_url":"https://api.github.com/repos/wcwxyz/virtcontainers/assignees{/user}","branches_url":"https://api.github.com/repos/wcwxyz/virtcontainers/branches{/branch}","tags_url":"https://api.github.com/repos/wcwxyz/virtcontainers/tags","blobs_url":"https://api.github.com/repos/wcwxyz/virtcontainers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wcwxyz/virtcontainers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wcwxyz/virtcontainers/git/refs{/sha}","trees_url":"https://api.github.com/repos/wcwxyz/virtcontainers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wcwxyz/virtcontainers/statuses/{sha}","languages_url":"https://api.github.com/repos/wcwxyz/virtcontainers/languages","stargazers_url":"https://api.github.com/repos/wcwxyz/virtcontainers/stargazers","contributors_url":"https://api.github.com/repos/wcwxyz/virtcontainers/contributors","subscribers_url":"https://api.github.com/repos/wcwxyz/virtcontainers/subscribers","subscription_url":"https://api.github.com/repos/wcwxyz/virtcontainers/subscription","commits_url":"https://api.github.com/repos/wcwxyz/virtcontainers/commits{/sha}","git_commits_url":"https://api.github.com/repos/wcwxyz/virtcontainers/git/commits{/sha}","comments_url":"https://api.github.com/repos/wcwxyz/virtcontainers/comments{/number}","issue_comment_url":"https://api.github.com/repos/wcwxyz/virtcontainers/issues/comments{/number}","contents_url":"https://api.github.com/repos/wcwxyz/virtcontainers/contents/{+path}","compare_url":"https://api.github.com/repos/wcwxyz/virtcontainers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wcwxyz/virtcontainers/merges","archive_url":"https://api.github.com/repos/wcwxyz/virtcontainers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wcwxyz/virtcontainers/downloads","issues_url":"https://api.github.com/repos/wcwxyz/virtcontainers/issues{/number}","pulls_url":"https://api.github.com/repos/wcwxyz/virtcontainers/pulls{/number}","milestones_url":"https://api.github.com/repos/wcwxyz/virtcontainers/milestones{/number}","notifications_url":"https://api.github.com/repos/wcwxyz/virtcontainers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wcwxyz/virtcontainers/labels{/name}","releases_url":"https://api.github.com/repos/wcwxyz/virtcontainers/releases{/id}","deployments_url":"https://api.github.com/repos/wcwxyz/virtcontainers/deployments","created_at":"2016-12-14T03:02:46Z","updated_at":"2016-12-14T03:02:47Z","pushed_at":"2017-08-01T08:27:57Z","git_url":"git://github.com/wcwxyz/virtcontainers.git","ssh_url":"git@github.com:wcwxyz/virtcontainers.git","clone_url":"https://github.com/wcwxyz/virtcontainers.git","svn_url":"https://github.com/wcwxyz/virtcontainers","homepage":null,"size":6820,"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":"containers:master","ref":"master","sha":"3db6fff932b5e3341db7c668b842294d4cc84ba4","user":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"repo":{"id":71125072,"name":"virtcontainers","full_name":"containers/virtcontainers","owner":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containers/virtcontainers","description":"A Go package for building hardware virtualized container runtimes","fork":false,"url":"https://api.github.com/repos/containers/virtcontainers","forks_url":"https://api.github.com/repos/containers/virtcontainers/forks","keys_url":"https://api.github.com/repos/containers/virtcontainers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containers/virtcontainers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containers/virtcontainers/teams","hooks_url":"https://api.github.com/repos/containers/virtcontainers/hooks","issue_events_url":"https://api.github.com/repos/containers/virtcontainers/issues/events{/number}","events_url":"https://api.github.com/repos/containers/virtcontainers/events","assignees_url":"https://api.github.com/repos/containers/virtcontainers/assignees{/user}","branches_url":"https://api.github.com/repos/containers/virtcontainers/branches{/branch}","tags_url":"https://api.github.com/repos/containers/virtcontainers/tags","blobs_url":"https://api.github.com/repos/containers/virtcontainers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containers/virtcontainers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containers/virtcontainers/git/refs{/sha}","trees_url":"https://api.github.com/repos/containers/virtcontainers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containers/virtcontainers/statuses/{sha}","languages_url":"https://api.github.com/repos/containers/virtcontainers/languages","stargazers_url":"https://api.github.com/repos/containers/virtcontainers/stargazers","contributors_url":"https://api.github.com/repos/containers/virtcontainers/contributors","subscribers_url":"https://api.github.com/repos/containers/virtcontainers/subscribers","subscription_url":"https://api.github.com/repos/containers/virtcontainers/subscription","commits_url":"https://api.github.com/repos/containers/virtcontainers/commits{/sha}","git_commits_url":"https://api.github.com/repos/containers/virtcontainers/git/commits{/sha}","comments_url":"https://api.github.com/repos/containers/virtcontainers/comments{/number}","issue_comment_url":"https://api.github.com/repos/containers/virtcontainers/issues/comments{/number}","contents_url":"https://api.github.com/repos/containers/virtcontainers/contents/{+path}","compare_url":"https://api.github.com/repos/containers/virtcontainers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containers/virtcontainers/merges","archive_url":"https://api.github.com/repos/containers/virtcontainers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containers/virtcontainers/downloads","issues_url":"https://api.github.com/repos/containers/virtcontainers/issues{/number}","pulls_url":"https://api.github.com/repos/containers/virtcontainers/pulls{/number}","milestones_url":"https://api.github.com/repos/containers/virtcontainers/milestones{/number}","notifications_url":"https://api.github.com/repos/containers/virtcontainers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containers/virtcontainers/labels{/name}","releases_url":"https://api.github.com/repos/containers/virtcontainers/releases{/id}","deployments_url":"https://api.github.com/repos/containers/virtcontainers/deployments","created_at":"2016-10-17T10:08:28Z","updated_at":"2017-07-17T05:26:49Z","pushed_at":"2017-08-01T10:08:43Z","git_url":"git://github.com/containers/virtcontainers.git","ssh_url":"git@github.com:containers/virtcontainers.git","clone_url":"https://github.com/containers/virtcontainers.git","svn_url":"https://github.com/containers/virtcontainers","homepage":null,"size":6846,"stargazers_count":24,"watchers_count":24,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":37,"forks":15,"open_issues":37,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/326"},"html":{"href":"https://github.com/containers/virtcontainers/pull/326"},"issue":{"href":"https://api.github.com/repos/containers/virtcontainers/issues/326"},"comments":{"href":"https://api.github.com/repos/containers/virtcontainers/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containers/virtcontainers/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/containers/virtcontainers/statuses/da51dd44b9648aa83145b323cd2636e2f5ce9292"}}}}
{"actor":{"display_login":"wcwxyz"}}