{"action":"created","comment":{"url":"https://api.github.com/repos/spf13/hugo/pulls/comments/41601069","id":41601069,"diff_hunk":"@@ -324,6 +324,30 @@ func TestAfter(t *testing.T) {\n \t}\n }\n \n+func TestDictionary(t *testing.T) {\n+\tfor i, this := range []struct {\n+\t\tv1     []interface{}\n+\t\texpecterr bool\n+\t\texpectedValue map[string] interface{}\n+\t}{\n+\t\t{[]interface{}{\"a\", \"b\"}, false, map[string]interface{}{\"a\":\"b\"}},\n+\t\t{[]interface{}{5, \"b\"}, true,nil},\n+\t\t{[]interface{}{\"a\", 12,\"b\",[]int{1, 2, 4}}, false,map[string]interface{}{\"a\":12,\"b\":[]int{1, 2, 4}}},\n+\t\t{[]interface{}{\"a\", \"b\", \"c\"}, true,nil},\n+\t} {\n+\t\tr,e := Dictionary(this.v1...)\n+\n+\t\tif (this.expecterr && e==nil) || (!this.expecterr && e!=nil)  {\n+\t\t\tt.Errorf(\"[%d] got an unexpected error\", i, e, this.expecterr)\n+\t\t} else if !this.expecterr {\n+\t\t\tif !reflect.DeepEqual(r, this.expectedValue) {","path":"tpl/template_funcs_test.go","position":20,"original_position":20,"commit_id":"2a82774f97c2503f0fa38170259b16ac48227b40","original_commit_id":"894e9c249ce2a23d941d490a7ff70ee5abbfcc5f","user":{"login":"bep","id":394382,"avatar_url":"https://avatars.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"body":"You are right. Thanks for sticking to your story. Sorry about that. If you haven't, could you \"put your name\" in this license thread:\r\n\r\nhttp://discuss.gohugo.io/t/switching-to-apache-2-license/173","created_at":"2015-10-09T06:34:16Z","updated_at":"2015-10-09T06:34:16Z","html_url":"https://github.com/spf13/hugo/pull/1463#discussion_r41601069","pull_request_url":"https://api.github.com/repos/spf13/hugo/pulls/1463","_links":{"self":{"href":"https://api.github.com/repos/spf13/hugo/pulls/comments/41601069"},"html":{"href":"https://github.com/spf13/hugo/pull/1463#discussion_r41601069"},"pull_request":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1463"}}},"pull_request":{"url":"https://api.github.com/repos/spf13/hugo/pulls/1463","id":46154213,"html_url":"https://github.com/spf13/hugo/pull/1463","diff_url":"https://github.com/spf13/hugo/pull/1463.diff","patch_url":"https://github.com/spf13/hugo/pull/1463.patch","issue_url":"https://api.github.com/repos/spf13/hugo/issues/1463","number":1463,"state":"open","locked":false,"title":"Added dictionary function that could be used to pass maps into a template.","user":{"login":"notzippy","id":1387526,"avatar_url":"https://avatars.githubusercontent.com/u/1387526?v=3","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"body":"Allows templates to dynamically build maps.\r\nExample usage: Creating and passing a map with the .Site information to a subtemplate while in a range on the parent\r\n\r\n    {{$baseurl := .Site.BaseURL }}\r\n    {{range .Site.Params.Bar}}\r\n        {{partial \"foo\" (dict \"foo\" . \"BaseURL\" $baseurl)}}\r\n    {{end}}\r\n\r\n","created_at":"2015-09-28T13:07:28Z","updated_at":"2015-10-09T06:34:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f0f9f0c3aaa3dfdf5049ba5c4f152a9b71a2c9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spf13/hugo/pulls/1463/commits","review_comments_url":"https://api.github.com/repos/spf13/hugo/pulls/1463/comments","review_comment_url":"https://api.github.com/repos/spf13/hugo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/1463/comments","statuses_url":"https://api.github.com/repos/spf13/hugo/statuses/2a82774f97c2503f0fa38170259b16ac48227b40","head":{"label":"notzippy:master","ref":"master","sha":"2a82774f97c2503f0fa38170259b16ac48227b40","user":{"login":"notzippy","id":1387526,"avatar_url":"https://avatars.githubusercontent.com/u/1387526?v=3","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"repo":{"id":43298757,"name":"hugo","full_name":"notzippy/hugo","owner":{"login":"notzippy","id":1387526,"avatar_url":"https://avatars.githubusercontent.com/u/1387526?v=3","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/notzippy/hugo","description":"A Fast and Flexible Static Site Generator built with love by spf13 in GoLang","fork":true,"url":"https://api.github.com/repos/notzippy/hugo","forks_url":"https://api.github.com/repos/notzippy/hugo/forks","keys_url":"https://api.github.com/repos/notzippy/hugo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/notzippy/hugo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/notzippy/hugo/teams","hooks_url":"https://api.github.com/repos/notzippy/hugo/hooks","issue_events_url":"https://api.github.com/repos/notzippy/hugo/issues/events{/number}","events_url":"https://api.github.com/repos/notzippy/hugo/events","assignees_url":"https://api.github.com/repos/notzippy/hugo/assignees{/user}","branches_url":"https://api.github.com/repos/notzippy/hugo/branches{/branch}","tags_url":"https://api.github.com/repos/notzippy/hugo/tags","blobs_url":"https://api.github.com/repos/notzippy/hugo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/notzippy/hugo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/notzippy/hugo/git/refs{/sha}","trees_url":"https://api.github.com/repos/notzippy/hugo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/notzippy/hugo/statuses/{sha}","languages_url":"https://api.github.com/repos/notzippy/hugo/languages","stargazers_url":"https://api.github.com/repos/notzippy/hugo/stargazers","contributors_url":"https://api.github.com/repos/notzippy/hugo/contributors","subscribers_url":"https://api.github.com/repos/notzippy/hugo/subscribers","subscription_url":"https://api.github.com/repos/notzippy/hugo/subscription","commits_url":"https://api.github.com/repos/notzippy/hugo/commits{/sha}","git_commits_url":"https://api.github.com/repos/notzippy/hugo/git/commits{/sha}","comments_url":"https://api.github.com/repos/notzippy/hugo/comments{/number}","issue_comment_url":"https://api.github.com/repos/notzippy/hugo/issues/comments{/number}","contents_url":"https://api.github.com/repos/notzippy/hugo/contents/{+path}","compare_url":"https://api.github.com/repos/notzippy/hugo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/notzippy/hugo/merges","archive_url":"https://api.github.com/repos/notzippy/hugo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/notzippy/hugo/downloads","issues_url":"https://api.github.com/repos/notzippy/hugo/issues{/number}","pulls_url":"https://api.github.com/repos/notzippy/hugo/pulls{/number}","milestones_url":"https://api.github.com/repos/notzippy/hugo/milestones{/number}","notifications_url":"https://api.github.com/repos/notzippy/hugo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/notzippy/hugo/labels{/name}","releases_url":"https://api.github.com/repos/notzippy/hugo/releases{/id}","created_at":"2015-09-28T12:10:33Z","updated_at":"2015-09-28T12:10:35Z","pushed_at":"2015-10-02T15:30:46Z","git_url":"git://github.com/notzippy/hugo.git","ssh_url":"git@github.com:notzippy/hugo.git","clone_url":"https://github.com/notzippy/hugo.git","svn_url":"https://github.com/notzippy/hugo","homepage":"http://gohugo.io","size":21570,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"spf13:master","ref":"master","sha":"08d41c3a48548597a33f460f209974b64591c6fa","user":{"login":"spf13","id":173412,"avatar_url":"https://avatars.githubusercontent.com/u/173412?v=3","gravatar_id":"","url":"https://api.github.com/users/spf13","html_url":"https://github.com/spf13","followers_url":"https://api.github.com/users/spf13/followers","following_url":"https://api.github.com/users/spf13/following{/other_user}","gists_url":"https://api.github.com/users/spf13/gists{/gist_id}","starred_url":"https://api.github.com/users/spf13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spf13/subscriptions","organizations_url":"https://api.github.com/users/spf13/orgs","repos_url":"https://api.github.com/users/spf13/repos","events_url":"https://api.github.com/users/spf13/events{/privacy}","received_events_url":"https://api.github.com/users/spf13/received_events","type":"User","site_admin":false},"repo":{"id":11180687,"name":"hugo","full_name":"spf13/hugo","owner":{"login":"spf13","id":173412,"avatar_url":"https://avatars.githubusercontent.com/u/173412?v=3","gravatar_id":"","url":"https://api.github.com/users/spf13","html_url":"https://github.com/spf13","followers_url":"https://api.github.com/users/spf13/followers","following_url":"https://api.github.com/users/spf13/following{/other_user}","gists_url":"https://api.github.com/users/spf13/gists{/gist_id}","starred_url":"https://api.github.com/users/spf13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spf13/subscriptions","organizations_url":"https://api.github.com/users/spf13/orgs","repos_url":"https://api.github.com/users/spf13/repos","events_url":"https://api.github.com/users/spf13/events{/privacy}","received_events_url":"https://api.github.com/users/spf13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spf13/hugo","description":"A Fast and Flexible Static Site Generator built with love by spf13 in GoLang","fork":false,"url":"https://api.github.com/repos/spf13/hugo","forks_url":"https://api.github.com/repos/spf13/hugo/forks","keys_url":"https://api.github.com/repos/spf13/hugo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spf13/hugo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spf13/hugo/teams","hooks_url":"https://api.github.com/repos/spf13/hugo/hooks","issue_events_url":"https://api.github.com/repos/spf13/hugo/issues/events{/number}","events_url":"https://api.github.com/repos/spf13/hugo/events","assignees_url":"https://api.github.com/repos/spf13/hugo/assignees{/user}","branches_url":"https://api.github.com/repos/spf13/hugo/branches{/branch}","tags_url":"https://api.github.com/repos/spf13/hugo/tags","blobs_url":"https://api.github.com/repos/spf13/hugo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spf13/hugo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spf13/hugo/git/refs{/sha}","trees_url":"https://api.github.com/repos/spf13/hugo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spf13/hugo/statuses/{sha}","languages_url":"https://api.github.com/repos/spf13/hugo/languages","stargazers_url":"https://api.github.com/repos/spf13/hugo/stargazers","contributors_url":"https://api.github.com/repos/spf13/hugo/contributors","subscribers_url":"https://api.github.com/repos/spf13/hugo/subscribers","subscription_url":"https://api.github.com/repos/spf13/hugo/subscription","commits_url":"https://api.github.com/repos/spf13/hugo/commits{/sha}","git_commits_url":"https://api.github.com/repos/spf13/hugo/git/commits{/sha}","comments_url":"https://api.github.com/repos/spf13/hugo/comments{/number}","issue_comment_url":"https://api.github.com/repos/spf13/hugo/issues/comments{/number}","contents_url":"https://api.github.com/repos/spf13/hugo/contents/{+path}","compare_url":"https://api.github.com/repos/spf13/hugo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spf13/hugo/merges","archive_url":"https://api.github.com/repos/spf13/hugo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spf13/hugo/downloads","issues_url":"https://api.github.com/repos/spf13/hugo/issues{/number}","pulls_url":"https://api.github.com/repos/spf13/hugo/pulls{/number}","milestones_url":"https://api.github.com/repos/spf13/hugo/milestones{/number}","notifications_url":"https://api.github.com/repos/spf13/hugo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spf13/hugo/labels{/name}","releases_url":"https://api.github.com/repos/spf13/hugo/releases{/id}","created_at":"2013-07-04T15:26:26Z","updated_at":"2015-10-08T21:40:31Z","pushed_at":"2015-10-08T23:17:50Z","git_url":"git://github.com/spf13/hugo.git","ssh_url":"git@github.com:spf13/hugo.git","clone_url":"https://github.com/spf13/hugo.git","svn_url":"https://github.com/spf13/hugo","homepage":"http://gohugo.io","size":32548,"stargazers_count":5950,"watchers_count":5950,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":938,"mirror_url":null,"open_issues_count":221,"forks":938,"open_issues":221,"watchers":5950,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1463"},"html":{"href":"https://github.com/spf13/hugo/pull/1463"},"issue":{"href":"https://api.github.com/repos/spf13/hugo/issues/1463"},"comments":{"href":"https://api.github.com/repos/spf13/hugo/issues/1463/comments"},"review_comments":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1463/comments"},"review_comment":{"href":"https://api.github.com/repos/spf13/hugo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1463/commits"},"statuses":{"href":"https://api.github.com/repos/spf13/hugo/statuses/2a82774f97c2503f0fa38170259b16ac48227b40"}}}}