{"action":"created","comment":{"url":"https://api.github.com/repos/linuxboot/fiano/pulls/comments/194888539","pull_request_review_id":128147826,"id":194888539,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDg4ODUzOQ==","diff_hunk":"@@ -25,3 +28,24 @@ func Parse(buf []byte) (Firmware, error) {\n \t\treturn nil, fmt.Errorf(\"Unknown firmware type\")\n \t}\n }\n+\n+// ExtractBinary simply dumps the binary to a specified directory and filename.\n+// It creates the directory if it doesn't already exist, and dumps the buffer to it.\n+// It returns the filepath of the binary, and an error if it exists.\n+// This is meant as a helper function for other Extract functions.\n+func ExtractBinary(buf []byte, dirPath string, filename string) (string, error) {\n+\t// Create the directory if it doesn't exist\n+\tif err := os.MkdirAll(dirPath, 0755); err != nil {\n+\t\treturn \"\", err\n+\t}\n+\n+\t// Dump the binary.\n+\tfp := filepath.Join(dirPath, filename)\n+\tbinFile, err := os.OpenFile(fp, os.O_RDWR|os.O_CREATE, 0666)\n+\tif err != nil {\n+\t\treturn fp, err\n+\t}\n+\tdefer binFile.Close()\n+\t_, err = binFile.Write(buf)","path":"uefi/uefi.go","position":39,"original_position":39,"commit_id":"a42f4fd398a548d0858172d37d0b4977566d9378","original_commit_id":"a42f4fd398a548d0858172d37d0b4977566d9378","user":{"login":"hugelgupf","id":1994130,"node_id":"MDQ6VXNlcjE5OTQxMzA=","avatar_url":"https://avatars2.githubusercontent.com/u/1994130?v=4","gravatar_id":"","url":"https://api.github.com/users/hugelgupf","html_url":"https://github.com/hugelgupf","followers_url":"https://api.github.com/users/hugelgupf/followers","following_url":"https://api.github.com/users/hugelgupf/following{/other_user}","gists_url":"https://api.github.com/users/hugelgupf/gists{/gist_id}","starred_url":"https://api.github.com/users/hugelgupf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugelgupf/subscriptions","organizations_url":"https://api.github.com/users/hugelgupf/orgs","repos_url":"https://api.github.com/users/hugelgupf/repos","events_url":"https://api.github.com/users/hugelgupf/events{/privacy}","received_events_url":"https://api.github.com/users/hugelgupf/received_events","type":"User","site_admin":false},"body":"if err != nil {\r\n  return \"\", err\r\n}","created_at":"2018-06-12T21:04:14Z","updated_at":"2018-06-12T21:08:50Z","html_url":"https://github.com/linuxboot/fiano/pull/10#discussion_r194888539","pull_request_url":"https://api.github.com/repos/linuxboot/fiano/pulls/10","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/comments/194888539"},"html":{"href":"https://github.com/linuxboot/fiano/pull/10#discussion_r194888539"},"pull_request":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/linuxboot/fiano/pulls/10","id":194162149,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MTYyMTQ5","html_url":"https://github.com/linuxboot/fiano/pull/10","diff_url":"https://github.com/linuxboot/fiano/pull/10.diff","patch_url":"https://github.com/linuxboot/fiano/pull/10.patch","issue_url":"https://api.github.com/repos/linuxboot/fiano/issues/10","number":10,"state":"open","locked":false,"title":"Extract","user":{"login":"GanShun","id":3449939,"node_id":"MDQ6VXNlcjM0NDk5Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/3449939?v=4","gravatar_id":"","url":"https://api.github.com/users/GanShun","html_url":"https://github.com/GanShun","followers_url":"https://api.github.com/users/GanShun/followers","following_url":"https://api.github.com/users/GanShun/following{/other_user}","gists_url":"https://api.github.com/users/GanShun/gists{/gist_id}","starred_url":"https://api.github.com/users/GanShun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GanShun/subscriptions","organizations_url":"https://api.github.com/users/GanShun/orgs","repos_url":"https://api.github.com/users/GanShun/repos","events_url":"https://api.github.com/users/GanShun/events{/privacy}","received_events_url":"https://api.github.com/users/GanShun/received_events","type":"User","site_admin":false},"body":"Early simplistic extract command","created_at":"2018-06-12T04:17:41Z","updated_at":"2018-06-12T21:08:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7c41889736e274d2b7e6dfe1e96724f12b3810b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rminnich","id":74928,"node_id":"MDQ6VXNlcjc0OTI4","avatar_url":"https://avatars0.githubusercontent.com/u/74928?v=4","gravatar_id":"","url":"https://api.github.com/users/rminnich","html_url":"https://github.com/rminnich","followers_url":"https://api.github.com/users/rminnich/followers","following_url":"https://api.github.com/users/rminnich/following{/other_user}","gists_url":"https://api.github.com/users/rminnich/gists{/gist_id}","starred_url":"https://api.github.com/users/rminnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rminnich/subscriptions","organizations_url":"https://api.github.com/users/rminnich/orgs","repos_url":"https://api.github.com/users/rminnich/repos","events_url":"https://api.github.com/users/rminnich/events{/privacy}","received_events_url":"https://api.github.com/users/rminnich/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linuxboot/fiano/pulls/10/commits","review_comments_url":"https://api.github.com/repos/linuxboot/fiano/pulls/10/comments","review_comment_url":"https://api.github.com/repos/linuxboot/fiano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linuxboot/fiano/issues/10/comments","statuses_url":"https://api.github.com/repos/linuxboot/fiano/statuses/a42f4fd398a548d0858172d37d0b4977566d9378","head":{"label":"GanShun:extract","ref":"extract","sha":"a42f4fd398a548d0858172d37d0b4977566d9378","user":{"login":"GanShun","id":3449939,"node_id":"MDQ6VXNlcjM0NDk5Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/3449939?v=4","gravatar_id":"","url":"https://api.github.com/users/GanShun","html_url":"https://github.com/GanShun","followers_url":"https://api.github.com/users/GanShun/followers","following_url":"https://api.github.com/users/GanShun/following{/other_user}","gists_url":"https://api.github.com/users/GanShun/gists{/gist_id}","starred_url":"https://api.github.com/users/GanShun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GanShun/subscriptions","organizations_url":"https://api.github.com/users/GanShun/orgs","repos_url":"https://api.github.com/users/GanShun/repos","events_url":"https://api.github.com/users/GanShun/events{/privacy}","received_events_url":"https://api.github.com/users/GanShun/received_events","type":"User","site_admin":false},"repo":{"id":134618877,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ2MTg4Nzc=","name":"fiano","full_name":"GanShun/fiano","owner":{"login":"GanShun","id":3449939,"node_id":"MDQ6VXNlcjM0NDk5Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/3449939?v=4","gravatar_id":"","url":"https://api.github.com/users/GanShun","html_url":"https://github.com/GanShun","followers_url":"https://api.github.com/users/GanShun/followers","following_url":"https://api.github.com/users/GanShun/following{/other_user}","gists_url":"https://api.github.com/users/GanShun/gists{/gist_id}","starred_url":"https://api.github.com/users/GanShun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GanShun/subscriptions","organizations_url":"https://api.github.com/users/GanShun/orgs","repos_url":"https://api.github.com/users/GanShun/repos","events_url":"https://api.github.com/users/GanShun/events{/privacy}","received_events_url":"https://api.github.com/users/GanShun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GanShun/fiano","description":"reworked EDK2 tools and code we need in a form the open source community is used to","fork":true,"url":"https://api.github.com/repos/GanShun/fiano","forks_url":"https://api.github.com/repos/GanShun/fiano/forks","keys_url":"https://api.github.com/repos/GanShun/fiano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GanShun/fiano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GanShun/fiano/teams","hooks_url":"https://api.github.com/repos/GanShun/fiano/hooks","issue_events_url":"https://api.github.com/repos/GanShun/fiano/issues/events{/number}","events_url":"https://api.github.com/repos/GanShun/fiano/events","assignees_url":"https://api.github.com/repos/GanShun/fiano/assignees{/user}","branches_url":"https://api.github.com/repos/GanShun/fiano/branches{/branch}","tags_url":"https://api.github.com/repos/GanShun/fiano/tags","blobs_url":"https://api.github.com/repos/GanShun/fiano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GanShun/fiano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GanShun/fiano/git/refs{/sha}","trees_url":"https://api.github.com/repos/GanShun/fiano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GanShun/fiano/statuses/{sha}","languages_url":"https://api.github.com/repos/GanShun/fiano/languages","stargazers_url":"https://api.github.com/repos/GanShun/fiano/stargazers","contributors_url":"https://api.github.com/repos/GanShun/fiano/contributors","subscribers_url":"https://api.github.com/repos/GanShun/fiano/subscribers","subscription_url":"https://api.github.com/repos/GanShun/fiano/subscription","commits_url":"https://api.github.com/repos/GanShun/fiano/commits{/sha}","git_commits_url":"https://api.github.com/repos/GanShun/fiano/git/commits{/sha}","comments_url":"https://api.github.com/repos/GanShun/fiano/comments{/number}","issue_comment_url":"https://api.github.com/repos/GanShun/fiano/issues/comments{/number}","contents_url":"https://api.github.com/repos/GanShun/fiano/contents/{+path}","compare_url":"https://api.github.com/repos/GanShun/fiano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GanShun/fiano/merges","archive_url":"https://api.github.com/repos/GanShun/fiano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GanShun/fiano/downloads","issues_url":"https://api.github.com/repos/GanShun/fiano/issues{/number}","pulls_url":"https://api.github.com/repos/GanShun/fiano/pulls{/number}","milestones_url":"https://api.github.com/repos/GanShun/fiano/milestones{/number}","notifications_url":"https://api.github.com/repos/GanShun/fiano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GanShun/fiano/labels{/name}","releases_url":"https://api.github.com/repos/GanShun/fiano/releases{/id}","deployments_url":"https://api.github.com/repos/GanShun/fiano/deployments","created_at":"2018-05-23T19:54:18Z","updated_at":"2018-06-08T22:16:10Z","pushed_at":"2018-06-12T20:56:27Z","git_url":"git://github.com/GanShun/fiano.git","ssh_url":"git@github.com:GanShun/fiano.git","clone_url":"https://github.com/GanShun/fiano.git","svn_url":"https://github.com/GanShun/fiano","homepage":null,"size":40,"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,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linuxboot:master","ref":"master","sha":"86500c10e04a8130fadb2a8c8aa685e7b7824346","user":{"login":"linuxboot","id":33524907,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNTI0OTA3","avatar_url":"https://avatars2.githubusercontent.com/u/33524907?v=4","gravatar_id":"","url":"https://api.github.com/users/linuxboot","html_url":"https://github.com/linuxboot","followers_url":"https://api.github.com/users/linuxboot/followers","following_url":"https://api.github.com/users/linuxboot/following{/other_user}","gists_url":"https://api.github.com/users/linuxboot/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxboot/subscriptions","organizations_url":"https://api.github.com/users/linuxboot/orgs","repos_url":"https://api.github.com/users/linuxboot/repos","events_url":"https://api.github.com/users/linuxboot/events{/privacy}","received_events_url":"https://api.github.com/users/linuxboot/received_events","type":"Organization","site_admin":false},"repo":{"id":122654287,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI2NTQyODc=","name":"fiano","full_name":"linuxboot/fiano","owner":{"login":"linuxboot","id":33524907,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNTI0OTA3","avatar_url":"https://avatars2.githubusercontent.com/u/33524907?v=4","gravatar_id":"","url":"https://api.github.com/users/linuxboot","html_url":"https://github.com/linuxboot","followers_url":"https://api.github.com/users/linuxboot/followers","following_url":"https://api.github.com/users/linuxboot/following{/other_user}","gists_url":"https://api.github.com/users/linuxboot/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxboot/subscriptions","organizations_url":"https://api.github.com/users/linuxboot/orgs","repos_url":"https://api.github.com/users/linuxboot/repos","events_url":"https://api.github.com/users/linuxboot/events{/privacy}","received_events_url":"https://api.github.com/users/linuxboot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linuxboot/fiano","description":"reworked EDK2 tools and code we need in a form the open source community is used to","fork":false,"url":"https://api.github.com/repos/linuxboot/fiano","forks_url":"https://api.github.com/repos/linuxboot/fiano/forks","keys_url":"https://api.github.com/repos/linuxboot/fiano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linuxboot/fiano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linuxboot/fiano/teams","hooks_url":"https://api.github.com/repos/linuxboot/fiano/hooks","issue_events_url":"https://api.github.com/repos/linuxboot/fiano/issues/events{/number}","events_url":"https://api.github.com/repos/linuxboot/fiano/events","assignees_url":"https://api.github.com/repos/linuxboot/fiano/assignees{/user}","branches_url":"https://api.github.com/repos/linuxboot/fiano/branches{/branch}","tags_url":"https://api.github.com/repos/linuxboot/fiano/tags","blobs_url":"https://api.github.com/repos/linuxboot/fiano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linuxboot/fiano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linuxboot/fiano/git/refs{/sha}","trees_url":"https://api.github.com/repos/linuxboot/fiano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linuxboot/fiano/statuses/{sha}","languages_url":"https://api.github.com/repos/linuxboot/fiano/languages","stargazers_url":"https://api.github.com/repos/linuxboot/fiano/stargazers","contributors_url":"https://api.github.com/repos/linuxboot/fiano/contributors","subscribers_url":"https://api.github.com/repos/linuxboot/fiano/subscribers","subscription_url":"https://api.github.com/repos/linuxboot/fiano/subscription","commits_url":"https://api.github.com/repos/linuxboot/fiano/commits{/sha}","git_commits_url":"https://api.github.com/repos/linuxboot/fiano/git/commits{/sha}","comments_url":"https://api.github.com/repos/linuxboot/fiano/comments{/number}","issue_comment_url":"https://api.github.com/repos/linuxboot/fiano/issues/comments{/number}","contents_url":"https://api.github.com/repos/linuxboot/fiano/contents/{+path}","compare_url":"https://api.github.com/repos/linuxboot/fiano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linuxboot/fiano/merges","archive_url":"https://api.github.com/repos/linuxboot/fiano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linuxboot/fiano/downloads","issues_url":"https://api.github.com/repos/linuxboot/fiano/issues{/number}","pulls_url":"https://api.github.com/repos/linuxboot/fiano/pulls{/number}","milestones_url":"https://api.github.com/repos/linuxboot/fiano/milestones{/number}","notifications_url":"https://api.github.com/repos/linuxboot/fiano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linuxboot/fiano/labels{/name}","releases_url":"https://api.github.com/repos/linuxboot/fiano/releases{/id}","deployments_url":"https://api.github.com/repos/linuxboot/fiano/deployments","created_at":"2018-02-23T17:50:49Z","updated_at":"2018-06-12T17:39:44Z","pushed_at":"2018-06-12T20:56:29Z","git_url":"git://github.com/linuxboot/fiano.git","ssh_url":"git@github.com:linuxboot/fiano.git","clone_url":"https://github.com/linuxboot/fiano.git","svn_url":"https://github.com/linuxboot/fiano","homepage":null,"size":36,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/10"},"html":{"href":"https://github.com/linuxboot/fiano/pull/10"},"issue":{"href":"https://api.github.com/repos/linuxboot/fiano/issues/10"},"comments":{"href":"https://api.github.com/repos/linuxboot/fiano/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linuxboot/fiano/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/linuxboot/fiano/statuses/a42f4fd398a548d0858172d37d0b4977566d9378"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hugelgupf"}}