{"action":"created","issue":{"url":"https://api.github.com/repos/fatih/structs/issues/45","repository_url":"https://api.github.com/repos/fatih/structs","labels_url":"https://api.github.com/repos/fatih/structs/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/fatih/structs/issues/45/comments","events_url":"https://api.github.com/repos/fatih/structs/issues/45/events","html_url":"https://github.com/fatih/structs/issues/45","id":134931161,"number":45,"title":"Why structs.Map() convert anonymous field in sub map?","user":{"login":"n3wtron","id":289479,"avatar_url":"https://avatars.githubusercontent.com/u/289479?v=3","gravatar_id":"","url":"https://api.github.com/users/n3wtron","html_url":"https://github.com/n3wtron","followers_url":"https://api.github.com/users/n3wtron/followers","following_url":"https://api.github.com/users/n3wtron/following{/other_user}","gists_url":"https://api.github.com/users/n3wtron/gists{/gist_id}","starred_url":"https://api.github.com/users/n3wtron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n3wtron/subscriptions","organizations_url":"https://api.github.com/users/n3wtron/orgs","repos_url":"https://api.github.com/users/n3wtron/repos","events_url":"https://api.github.com/users/n3wtron/events{/privacy}","received_events_url":"https://api.github.com/users/n3wtron/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-19T17:52:57Z","updated_at":"2016-02-20T11:02:51Z","closed_at":"2016-02-20T11:02:51Z","body":"```\r\ntype A{\r\n  Name string\r\n}\r\n\r\ntype B{\r\n A\r\n Surname string\r\n}\r\nvar t B;\r\nstructs.Map(t)\r\n```\r\ngenerate a map like\r\n`map[A:map[Name:] Surname:]`\r\nbut A is an anonymous field I'm expecting a flat map like\r\n`map[Name:Surname:]`"},"comment":{"url":"https://api.github.com/repos/fatih/structs/issues/comments/186571338","html_url":"https://github.com/fatih/structs/issues/45#issuecomment-186571338","issue_url":"https://api.github.com/repos/fatih/structs/issues/45","id":186571338,"user":{"login":"fatih","id":438920,"avatar_url":"https://avatars.githubusercontent.com/u/438920?v=3","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T11:02:51Z","updated_at":"2016-02-20T11:02:51Z","body":"Hi @n3wtron. It's not allowed because the struct A and B might have the same struct names and it would collide. It's not a bug, it's a design decision.  "}}