{"action":"created","comment":{"url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/comments/37706876","id":37706876,"diff_hunk":"@@ -348,17 +348,30 @@ func getFields(typ reflect.Type) fields {\n \t\tif name == \"-\" {\n \t\t\tcontinue\n \t\t}\n+\t\tftyp := f.Type\n+\t\tif ftyp.Kind() == reflect.Ptr {\n+\t\t\tftyp = ftyp.Elem()\n+\t\t}\n+\t\tif opts.Contains(\"inline\") && ftyp.Kind() == reflect.Struct {","path":"typeinfo.go","position":26,"original_position":8,"commit_id":"a961cd8ac19f9f789c541a418cfbb89d4ca4a92d","original_commit_id":"dca6e0d3e109d182860cfa589e3a2f82b5b27ad1","user":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"body":"Indeed `embed` would fit better, however there was already precedence and `inline` shows up in couple of places:\r\n\r\n- proposed `inline` opt for `encoding/json` (https://github.com/golang/go/issues/6213)\r\n- existing `inline` opt in `gopkg.in/yaml.v2` (https://godoc.org/gopkg.in/yaml.v2#Marshal)\r\n\r\nSo I think I'd better to stick with `inline`.","created_at":"2015-08-23T15:39:04Z","updated_at":"2015-08-23T15:39:04Z","html_url":"https://github.com/vmihailenco/msgpack/pull/40#discussion_r37706876","pull_request_url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/comments/37706876"},"html":{"href":"https://github.com/vmihailenco/msgpack/pull/40#discussion_r37706876"},"pull_request":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40","id":42958697,"html_url":"https://github.com/vmihailenco/msgpack/pull/40","diff_url":"https://github.com/vmihailenco/msgpack/pull/40.diff","patch_url":"https://github.com/vmihailenco/msgpack/pull/40.patch","issue_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/40","number":40,"state":"open","locked":false,"title":"Add support for inlining struct fields.","user":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"body":"msgpack encoder differ in behaviour from the json one - the latter inlines\r\nfields of an embedded struct as they were part of the parent struct.\r\n\r\nWhile we can't change the behaviour due to compatibility reasons we can\r\nintroduce `inline` opt, which will make the encoding similar in\r\nbehaviour to the json one.\r\n\r\n/cc @vmihailenco Please take a look.","created_at":"2015-08-20T17:57:47Z","updated_at":"2015-08-23T15:39:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6efe5be3abf75a953eaeac69178acb83bdadd862","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40/commits","review_comments_url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40/comments","review_comment_url":"https://api.github.com/repos/vmihailenco/msgpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/40/comments","statuses_url":"https://api.github.com/repos/vmihailenco/msgpack/statuses/a961cd8ac19f9f789c541a418cfbb89d4ca4a92d","head":{"label":"rjeczalik:master","ref":"master","sha":"a961cd8ac19f9f789c541a418cfbb89d4ca4a92d","user":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"repo":{"id":41108155,"name":"msgpack","full_name":"rjeczalik/msgpack","owner":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjeczalik/msgpack","description":"Msgpack encoding for Golang.","fork":true,"url":"https://api.github.com/repos/rjeczalik/msgpack","forks_url":"https://api.github.com/repos/rjeczalik/msgpack/forks","keys_url":"https://api.github.com/repos/rjeczalik/msgpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjeczalik/msgpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjeczalik/msgpack/teams","hooks_url":"https://api.github.com/repos/rjeczalik/msgpack/hooks","issue_events_url":"https://api.github.com/repos/rjeczalik/msgpack/issues/events{/number}","events_url":"https://api.github.com/repos/rjeczalik/msgpack/events","assignees_url":"https://api.github.com/repos/rjeczalik/msgpack/assignees{/user}","branches_url":"https://api.github.com/repos/rjeczalik/msgpack/branches{/branch}","tags_url":"https://api.github.com/repos/rjeczalik/msgpack/tags","blobs_url":"https://api.github.com/repos/rjeczalik/msgpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjeczalik/msgpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjeczalik/msgpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjeczalik/msgpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjeczalik/msgpack/statuses/{sha}","languages_url":"https://api.github.com/repos/rjeczalik/msgpack/languages","stargazers_url":"https://api.github.com/repos/rjeczalik/msgpack/stargazers","contributors_url":"https://api.github.com/repos/rjeczalik/msgpack/contributors","subscribers_url":"https://api.github.com/repos/rjeczalik/msgpack/subscribers","subscription_url":"https://api.github.com/repos/rjeczalik/msgpack/subscription","commits_url":"https://api.github.com/repos/rjeczalik/msgpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjeczalik/msgpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjeczalik/msgpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjeczalik/msgpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjeczalik/msgpack/contents/{+path}","compare_url":"https://api.github.com/repos/rjeczalik/msgpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjeczalik/msgpack/merges","archive_url":"https://api.github.com/repos/rjeczalik/msgpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjeczalik/msgpack/downloads","issues_url":"https://api.github.com/repos/rjeczalik/msgpack/issues{/number}","pulls_url":"https://api.github.com/repos/rjeczalik/msgpack/pulls{/number}","milestones_url":"https://api.github.com/repos/rjeczalik/msgpack/milestones{/number}","notifications_url":"https://api.github.com/repos/rjeczalik/msgpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjeczalik/msgpack/labels{/name}","releases_url":"https://api.github.com/repos/rjeczalik/msgpack/releases{/id}","created_at":"2015-08-20T16:57:34Z","updated_at":"2015-08-20T16:57:35Z","pushed_at":"2015-08-23T15:38:14Z","git_url":"git://github.com/rjeczalik/msgpack.git","ssh_url":"git@github.com:rjeczalik/msgpack.git","clone_url":"https://github.com/rjeczalik/msgpack.git","svn_url":"https://github.com/rjeczalik/msgpack","homepage":"","size":212,"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":"vmihailenco:master","ref":"master","sha":"042c4f5a4f4027470e2b1abd06ec9c6eb100fea1","user":{"login":"vmihailenco","id":290976,"avatar_url":"https://avatars.githubusercontent.com/u/290976?v=3","gravatar_id":"","url":"https://api.github.com/users/vmihailenco","html_url":"https://github.com/vmihailenco","followers_url":"https://api.github.com/users/vmihailenco/followers","following_url":"https://api.github.com/users/vmihailenco/following{/other_user}","gists_url":"https://api.github.com/users/vmihailenco/gists{/gist_id}","starred_url":"https://api.github.com/users/vmihailenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmihailenco/subscriptions","organizations_url":"https://api.github.com/users/vmihailenco/orgs","repos_url":"https://api.github.com/users/vmihailenco/repos","events_url":"https://api.github.com/users/vmihailenco/events{/privacy}","received_events_url":"https://api.github.com/users/vmihailenco/received_events","type":"User","site_admin":false},"repo":{"id":6417158,"name":"msgpack","full_name":"vmihailenco/msgpack","owner":{"login":"vmihailenco","id":290976,"avatar_url":"https://avatars.githubusercontent.com/u/290976?v=3","gravatar_id":"","url":"https://api.github.com/users/vmihailenco","html_url":"https://github.com/vmihailenco","followers_url":"https://api.github.com/users/vmihailenco/followers","following_url":"https://api.github.com/users/vmihailenco/following{/other_user}","gists_url":"https://api.github.com/users/vmihailenco/gists{/gist_id}","starred_url":"https://api.github.com/users/vmihailenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmihailenco/subscriptions","organizations_url":"https://api.github.com/users/vmihailenco/orgs","repos_url":"https://api.github.com/users/vmihailenco/repos","events_url":"https://api.github.com/users/vmihailenco/events{/privacy}","received_events_url":"https://api.github.com/users/vmihailenco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmihailenco/msgpack","description":"Msgpack encoding for Golang.","fork":false,"url":"https://api.github.com/repos/vmihailenco/msgpack","forks_url":"https://api.github.com/repos/vmihailenco/msgpack/forks","keys_url":"https://api.github.com/repos/vmihailenco/msgpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmihailenco/msgpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmihailenco/msgpack/teams","hooks_url":"https://api.github.com/repos/vmihailenco/msgpack/hooks","issue_events_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/events{/number}","events_url":"https://api.github.com/repos/vmihailenco/msgpack/events","assignees_url":"https://api.github.com/repos/vmihailenco/msgpack/assignees{/user}","branches_url":"https://api.github.com/repos/vmihailenco/msgpack/branches{/branch}","tags_url":"https://api.github.com/repos/vmihailenco/msgpack/tags","blobs_url":"https://api.github.com/repos/vmihailenco/msgpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmihailenco/msgpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmihailenco/msgpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmihailenco/msgpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmihailenco/msgpack/statuses/{sha}","languages_url":"https://api.github.com/repos/vmihailenco/msgpack/languages","stargazers_url":"https://api.github.com/repos/vmihailenco/msgpack/stargazers","contributors_url":"https://api.github.com/repos/vmihailenco/msgpack/contributors","subscribers_url":"https://api.github.com/repos/vmihailenco/msgpack/subscribers","subscription_url":"https://api.github.com/repos/vmihailenco/msgpack/subscription","commits_url":"https://api.github.com/repos/vmihailenco/msgpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmihailenco/msgpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmihailenco/msgpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmihailenco/msgpack/contents/{+path}","compare_url":"https://api.github.com/repos/vmihailenco/msgpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmihailenco/msgpack/merges","archive_url":"https://api.github.com/repos/vmihailenco/msgpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmihailenco/msgpack/downloads","issues_url":"https://api.github.com/repos/vmihailenco/msgpack/issues{/number}","pulls_url":"https://api.github.com/repos/vmihailenco/msgpack/pulls{/number}","milestones_url":"https://api.github.com/repos/vmihailenco/msgpack/milestones{/number}","notifications_url":"https://api.github.com/repos/vmihailenco/msgpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmihailenco/msgpack/labels{/name}","releases_url":"https://api.github.com/repos/vmihailenco/msgpack/releases{/id}","created_at":"2012-10-27T13:17:38Z","updated_at":"2015-08-17T16:57:31Z","pushed_at":"2015-08-23T15:38:14Z","git_url":"git://github.com/vmihailenco/msgpack.git","ssh_url":"git@github.com:vmihailenco/msgpack.git","clone_url":"https://github.com/vmihailenco/msgpack.git","svn_url":"https://github.com/vmihailenco/msgpack","homepage":"","size":662,"stargazers_count":174,"watchers_count":174,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40"},"html":{"href":"https://github.com/vmihailenco/msgpack/pull/40"},"issue":{"href":"https://api.github.com/repos/vmihailenco/msgpack/issues/40"},"comments":{"href":"https://api.github.com/repos/vmihailenco/msgpack/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmihailenco/msgpack/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/vmihailenco/msgpack/statuses/a961cd8ac19f9f789c541a418cfbb89d4ca4a92d"}}}}