{"action":"closed","number":1026,"pull_request":{"url":"https://api.github.com/repos/spf13/hugo/pulls/1026","id":32430680,"html_url":"https://github.com/spf13/hugo/pull/1026","diff_url":"https://github.com/spf13/hugo/pull/1026.diff","patch_url":"https://github.com/spf13/hugo/pull/1026.patch","issue_url":"https://api.github.com/repos/spf13/hugo/issues/1026","number":1026,"state":"closed","locked":false,"title":"Add template debugging functions","user":{"login":"mdhender","id":11139100,"avatar_url":"https://avatars.githubusercontent.com/u/11139100?v=3","gravatar_id":"","url":"https://api.github.com/users/mdhender","html_url":"https://github.com/mdhender","followers_url":"https://api.github.com/users/mdhender/followers","following_url":"https://api.github.com/users/mdhender/following{/other_user}","gists_url":"https://api.github.com/users/mdhender/gists{/gist_id}","starred_url":"https://api.github.com/users/mdhender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdhender/subscriptions","organizations_url":"https://api.github.com/users/mdhender/orgs","repos_url":"https://api.github.com/users/mdhender/repos","events_url":"https://api.github.com/users/mdhender/events{/privacy}","received_events_url":"https://api.github.com/users/mdhender/received_events","type":"User","site_admin":false},"body":"Template developers frequently need to show variable values while \r\ndebugging templates. Issue #1009 requests better support for this.\r\n\r\nThe `printf \"%#v\"` idiom is powerful but requires some knowledge\r\nof Hugo's internal representation of Go value types. Not all\r\ntemplate designers will have that knowledge. The two functions\r\n`inspect` and `typeOf` provide a path towards easier to use and\r\nunderstand printing of variables and values.\r\n\r\nThe `inspect` function replaces the `printf` call. This version\r\nrelies on the default `string` conversion for the result. This\r\nprovides a path towards pretty-printing variables and values.\r\n\r\nTemplates may use `typeOf` to determine the best formatting\r\nfor variables and values.","created_at":"2015-04-01T15:35:56Z","updated_at":"2015-04-02T20:35:06Z","closed_at":"2015-04-02T20:35:06Z","merged_at":null,"merge_commit_sha":"d559fa369c958ad64accd40789e4a6a8b6ac0c0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spf13/hugo/pulls/1026/commits","review_comments_url":"https://api.github.com/repos/spf13/hugo/pulls/1026/comments","review_comment_url":"https://api.github.com/repos/spf13/hugo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/1026/comments","statuses_url":"https://api.github.com/repos/spf13/hugo/statuses/e26d88360a0a3e25cbba66f7c6b584712ee253e2","head":{"label":"mdhender:new-inspect-commands","ref":"new-inspect-commands","sha":"e26d88360a0a3e25cbba66f7c6b584712ee253e2","user":{"login":"mdhender","id":11139100,"avatar_url":"https://avatars.githubusercontent.com/u/11139100?v=3","gravatar_id":"","url":"https://api.github.com/users/mdhender","html_url":"https://github.com/mdhender","followers_url":"https://api.github.com/users/mdhender/followers","following_url":"https://api.github.com/users/mdhender/following{/other_user}","gists_url":"https://api.github.com/users/mdhender/gists{/gist_id}","starred_url":"https://api.github.com/users/mdhender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdhender/subscriptions","organizations_url":"https://api.github.com/users/mdhender/orgs","repos_url":"https://api.github.com/users/mdhender/repos","events_url":"https://api.github.com/users/mdhender/events{/privacy}","received_events_url":"https://api.github.com/users/mdhender/received_events","type":"User","site_admin":false},"repo":{"id":32408697,"name":"hugo","full_name":"mdhender/hugo","owner":{"login":"mdhender","id":11139100,"avatar_url":"https://avatars.githubusercontent.com/u/11139100?v=3","gravatar_id":"","url":"https://api.github.com/users/mdhender","html_url":"https://github.com/mdhender","followers_url":"https://api.github.com/users/mdhender/followers","following_url":"https://api.github.com/users/mdhender/following{/other_user}","gists_url":"https://api.github.com/users/mdhender/gists{/gist_id}","starred_url":"https://api.github.com/users/mdhender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdhender/subscriptions","organizations_url":"https://api.github.com/users/mdhender/orgs","repos_url":"https://api.github.com/users/mdhender/repos","events_url":"https://api.github.com/users/mdhender/events{/privacy}","received_events_url":"https://api.github.com/users/mdhender/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdhender/hugo","description":"A Fast and Flexible Static Site Generator built with love by spf13 in GoLang","fork":true,"url":"https://api.github.com/repos/mdhender/hugo","forks_url":"https://api.github.com/repos/mdhender/hugo/forks","keys_url":"https://api.github.com/repos/mdhender/hugo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdhender/hugo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdhender/hugo/teams","hooks_url":"https://api.github.com/repos/mdhender/hugo/hooks","issue_events_url":"https://api.github.com/repos/mdhender/hugo/issues/events{/number}","events_url":"https://api.github.com/repos/mdhender/hugo/events","assignees_url":"https://api.github.com/repos/mdhender/hugo/assignees{/user}","branches_url":"https://api.github.com/repos/mdhender/hugo/branches{/branch}","tags_url":"https://api.github.com/repos/mdhender/hugo/tags","blobs_url":"https://api.github.com/repos/mdhender/hugo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdhender/hugo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdhender/hugo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdhender/hugo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdhender/hugo/statuses/{sha}","languages_url":"https://api.github.com/repos/mdhender/hugo/languages","stargazers_url":"https://api.github.com/repos/mdhender/hugo/stargazers","contributors_url":"https://api.github.com/repos/mdhender/hugo/contributors","subscribers_url":"https://api.github.com/repos/mdhender/hugo/subscribers","subscription_url":"https://api.github.com/repos/mdhender/hugo/subscription","commits_url":"https://api.github.com/repos/mdhender/hugo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdhender/hugo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdhender/hugo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdhender/hugo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdhender/hugo/contents/{+path}","compare_url":"https://api.github.com/repos/mdhender/hugo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdhender/hugo/merges","archive_url":"https://api.github.com/repos/mdhender/hugo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdhender/hugo/downloads","issues_url":"https://api.github.com/repos/mdhender/hugo/issues{/number}","pulls_url":"https://api.github.com/repos/mdhender/hugo/pulls{/number}","milestones_url":"https://api.github.com/repos/mdhender/hugo/milestones{/number}","notifications_url":"https://api.github.com/repos/mdhender/hugo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdhender/hugo/labels{/name}","releases_url":"https://api.github.com/repos/mdhender/hugo/releases{/id}","created_at":"2015-03-17T17:21:05Z","updated_at":"2015-04-02T15:28:12Z","pushed_at":"2015-04-02T20:35:06Z","git_url":"git://github.com/mdhender/hugo.git","ssh_url":"git@github.com:mdhender/hugo.git","clone_url":"https://github.com/mdhender/hugo.git","svn_url":"https://github.com/mdhender/hugo","homepage":"http://gohugo.io","size":16414,"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":"be627fa718d23278aeb53da5651a8a4a1be14c27","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-04-02T17:45:02Z","pushed_at":"2015-04-02T15:51:07Z","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":27487,"stargazers_count":3774,"watchers_count":3774,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":557,"mirror_url":null,"open_issues_count":167,"forks":557,"open_issues":167,"watchers":3774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1026"},"html":{"href":"https://github.com/spf13/hugo/pull/1026"},"issue":{"href":"https://api.github.com/repos/spf13/hugo/issues/1026"},"comments":{"href":"https://api.github.com/repos/spf13/hugo/issues/1026/comments"},"review_comments":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1026/comments"},"review_comment":{"href":"https://api.github.com/repos/spf13/hugo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spf13/hugo/pulls/1026/commits"},"statuses":{"href":"https://api.github.com/repos/spf13/hugo/statuses/e26d88360a0a3e25cbba66f7c6b584712ee253e2"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":151,"deletions":0,"changed_files":3}}