{"action":"created","comment":{"url":"https://api.github.com/repos/urso/ucfg/pulls/comments/67680244","id":67680244,"diff_hunk":"@@ -0,0 +1,94 @@\n+package flag\n+\n+import (\n+\t\"errors\"\n+\tgoflag \"flag\"\n+\t\"strings\"\n+\t\"testing\"\n+\n+\t\"github.com/stretchr/testify/assert\"\n+\t\"github.com/urso/ucfg\"\n+)\n+\n+func TestFlagFileParsePrimitives(t *testing.T) {\n+\tconfig, err := parseTestFileFlags(\"-c test.a -c test.b\",\n+\t\tmap[string]FileLoader{\n+\t\t\t\".a\": makeLoadTestConfig(map[string]interface{}{\n+\t\t\t\t\"b\": true,\n+\t\t\t\t\"i\": 42,\n+\t\t\t}),\n+\t\t\t\".b\": makeLoadTestConfig(map[string]interface{}{\n+\t\t\t\t\"b2\": true,\n+\t\t\t\t\"f\":  3.14,\n+\t\t\t\t\"s\":  \"string\",\n+\t\t\t}),\n+\t\t},\n+\t)\n+\n+\tassert.NoError(t, err)\n+\tcheckFields(t, config)\n+}\n+\n+func TestFlagFileParseOverwrites(t *testing.T) {\n+\tconfig, err := parseTestFileFlags(\"-c test.a -c test.b\",","path":"flag/file_test.go","position":33,"original_position":33,"commit_id":"4f02e74b0f44342e36b34e39f4f5a008a11ddfc4","original_commit_id":"4f02e74b0f44342e36b34e39f4f5a008a11ddfc4","user":{"login":"ruflin","id":244900,"avatar_url":"https://avatars.githubusercontent.com/u/244900?v=3","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"body":"So the latest will always overload the previous which I agree is good. What happens if the previous type was different from the next type? I would expect an error.","created_at":"2016-06-20T12:22:40Z","updated_at":"2016-06-20T12:22:40Z","html_url":"https://github.com/urso/ucfg/pull/35#discussion_r67680244","pull_request_url":"https://api.github.com/repos/urso/ucfg/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/urso/ucfg/pulls/comments/67680244"},"html":{"href":"https://github.com/urso/ucfg/pull/35#discussion_r67680244"},"pull_request":{"href":"https://api.github.com/repos/urso/ucfg/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/urso/ucfg/pulls/35","id":74373211,"html_url":"https://github.com/urso/ucfg/pull/35","diff_url":"https://github.com/urso/ucfg/pull/35.diff","patch_url":"https://github.com/urso/ucfg/pull/35.patch","issue_url":"https://api.github.com/repos/urso/ucfg/issues/35","number":35,"state":"open","locked":false,"title":"Add custom CLI flag registration support","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-19T20:30:02Z","updated_at":"2016-06-20T12:22:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1244caa42b4f6f9fc79a7d6ddf0c855d41ff4108","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/urso/ucfg/pulls/35/commits","review_comments_url":"https://api.github.com/repos/urso/ucfg/pulls/35/comments","review_comment_url":"https://api.github.com/repos/urso/ucfg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urso/ucfg/issues/35/comments","statuses_url":"https://api.github.com/repos/urso/ucfg/statuses/4f02e74b0f44342e36b34e39f4f5a008a11ddfc4","head":{"label":"urso:feature/15-cli-flags","ref":"feature/15-cli-flags","sha":"4f02e74b0f44342e36b34e39f4f5a008a11ddfc4","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"repo":{"id":49433170,"name":"ucfg","full_name":"urso/ucfg","owner":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/urso/ucfg","description":"","fork":false,"url":"https://api.github.com/repos/urso/ucfg","forks_url":"https://api.github.com/repos/urso/ucfg/forks","keys_url":"https://api.github.com/repos/urso/ucfg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urso/ucfg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urso/ucfg/teams","hooks_url":"https://api.github.com/repos/urso/ucfg/hooks","issue_events_url":"https://api.github.com/repos/urso/ucfg/issues/events{/number}","events_url":"https://api.github.com/repos/urso/ucfg/events","assignees_url":"https://api.github.com/repos/urso/ucfg/assignees{/user}","branches_url":"https://api.github.com/repos/urso/ucfg/branches{/branch}","tags_url":"https://api.github.com/repos/urso/ucfg/tags","blobs_url":"https://api.github.com/repos/urso/ucfg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urso/ucfg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urso/ucfg/git/refs{/sha}","trees_url":"https://api.github.com/repos/urso/ucfg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urso/ucfg/statuses/{sha}","languages_url":"https://api.github.com/repos/urso/ucfg/languages","stargazers_url":"https://api.github.com/repos/urso/ucfg/stargazers","contributors_url":"https://api.github.com/repos/urso/ucfg/contributors","subscribers_url":"https://api.github.com/repos/urso/ucfg/subscribers","subscription_url":"https://api.github.com/repos/urso/ucfg/subscription","commits_url":"https://api.github.com/repos/urso/ucfg/commits{/sha}","git_commits_url":"https://api.github.com/repos/urso/ucfg/git/commits{/sha}","comments_url":"https://api.github.com/repos/urso/ucfg/comments{/number}","issue_comment_url":"https://api.github.com/repos/urso/ucfg/issues/comments{/number}","contents_url":"https://api.github.com/repos/urso/ucfg/contents/{+path}","compare_url":"https://api.github.com/repos/urso/ucfg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urso/ucfg/merges","archive_url":"https://api.github.com/repos/urso/ucfg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urso/ucfg/downloads","issues_url":"https://api.github.com/repos/urso/ucfg/issues{/number}","pulls_url":"https://api.github.com/repos/urso/ucfg/pulls{/number}","milestones_url":"https://api.github.com/repos/urso/ucfg/milestones{/number}","notifications_url":"https://api.github.com/repos/urso/ucfg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urso/ucfg/labels{/name}","releases_url":"https://api.github.com/repos/urso/ucfg/releases{/id}","deployments_url":"https://api.github.com/repos/urso/ucfg/deployments","created_at":"2016-01-11T14:56:11Z","updated_at":"2016-01-11T15:42:16Z","pushed_at":"2016-06-20T11:51:43Z","git_url":"git://github.com/urso/ucfg.git","ssh_url":"git@github.com:urso/ucfg.git","clone_url":"https://github.com/urso/ucfg.git","svn_url":"https://github.com/urso/ucfg","homepage":null,"size":142,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"urso:master","ref":"master","sha":"bb3a7c708b94a1f8484018e938e7d1cf1b285d3a","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"repo":{"id":49433170,"name":"ucfg","full_name":"urso/ucfg","owner":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/urso/ucfg","description":"","fork":false,"url":"https://api.github.com/repos/urso/ucfg","forks_url":"https://api.github.com/repos/urso/ucfg/forks","keys_url":"https://api.github.com/repos/urso/ucfg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urso/ucfg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urso/ucfg/teams","hooks_url":"https://api.github.com/repos/urso/ucfg/hooks","issue_events_url":"https://api.github.com/repos/urso/ucfg/issues/events{/number}","events_url":"https://api.github.com/repos/urso/ucfg/events","assignees_url":"https://api.github.com/repos/urso/ucfg/assignees{/user}","branches_url":"https://api.github.com/repos/urso/ucfg/branches{/branch}","tags_url":"https://api.github.com/repos/urso/ucfg/tags","blobs_url":"https://api.github.com/repos/urso/ucfg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urso/ucfg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urso/ucfg/git/refs{/sha}","trees_url":"https://api.github.com/repos/urso/ucfg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urso/ucfg/statuses/{sha}","languages_url":"https://api.github.com/repos/urso/ucfg/languages","stargazers_url":"https://api.github.com/repos/urso/ucfg/stargazers","contributors_url":"https://api.github.com/repos/urso/ucfg/contributors","subscribers_url":"https://api.github.com/repos/urso/ucfg/subscribers","subscription_url":"https://api.github.com/repos/urso/ucfg/subscription","commits_url":"https://api.github.com/repos/urso/ucfg/commits{/sha}","git_commits_url":"https://api.github.com/repos/urso/ucfg/git/commits{/sha}","comments_url":"https://api.github.com/repos/urso/ucfg/comments{/number}","issue_comment_url":"https://api.github.com/repos/urso/ucfg/issues/comments{/number}","contents_url":"https://api.github.com/repos/urso/ucfg/contents/{+path}","compare_url":"https://api.github.com/repos/urso/ucfg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urso/ucfg/merges","archive_url":"https://api.github.com/repos/urso/ucfg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urso/ucfg/downloads","issues_url":"https://api.github.com/repos/urso/ucfg/issues{/number}","pulls_url":"https://api.github.com/repos/urso/ucfg/pulls{/number}","milestones_url":"https://api.github.com/repos/urso/ucfg/milestones{/number}","notifications_url":"https://api.github.com/repos/urso/ucfg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urso/ucfg/labels{/name}","releases_url":"https://api.github.com/repos/urso/ucfg/releases{/id}","deployments_url":"https://api.github.com/repos/urso/ucfg/deployments","created_at":"2016-01-11T14:56:11Z","updated_at":"2016-01-11T15:42:16Z","pushed_at":"2016-06-20T11:51:43Z","git_url":"git://github.com/urso/ucfg.git","ssh_url":"git@github.com:urso/ucfg.git","clone_url":"https://github.com/urso/ucfg.git","svn_url":"https://github.com/urso/ucfg","homepage":null,"size":142,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urso/ucfg/pulls/35"},"html":{"href":"https://github.com/urso/ucfg/pull/35"},"issue":{"href":"https://api.github.com/repos/urso/ucfg/issues/35"},"comments":{"href":"https://api.github.com/repos/urso/ucfg/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/urso/ucfg/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/urso/ucfg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urso/ucfg/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/urso/ucfg/statuses/4f02e74b0f44342e36b34e39f4f5a008a11ddfc4"}}}}
{"actor":{"display_login":"ruflin"}}