{"action":"created","issue":{"url":"https://api.github.com/repos/clbanning/checkxml/issues/3","repository_url":"https://api.github.com/repos/clbanning/checkxml","labels_url":"https://api.github.com/repos/clbanning/checkxml/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/clbanning/checkxml/issues/3/comments","events_url":"https://api.github.com/repos/clbanning/checkxml/issues/3/events","html_url":"https://github.com/clbanning/checkxml/issues/3","id":385232141,"node_id":"MDU6SXNzdWUzODUyMzIxNDE=","number":3,"title":"UnknownXMLTags result not correct when their is a pointer in test struct","user":{"login":"sunsun314","id":7465154,"node_id":"MDQ6VXNlcjc0NjUxNTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7465154?v=4","gravatar_id":"","url":"https://api.github.com/users/sunsun314","html_url":"https://github.com/sunsun314","followers_url":"https://api.github.com/users/sunsun314/followers","following_url":"https://api.github.com/users/sunsun314/following{/other_user}","gists_url":"https://api.github.com/users/sunsun314/gists{/gist_id}","starred_url":"https://api.github.com/users/sunsun314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunsun314/subscriptions","organizations_url":"https://api.github.com/users/sunsun314/orgs","repos_url":"https://api.github.com/users/sunsun314/repos","events_url":"https://api.github.com/users/sunsun314/events{/privacy}","received_events_url":"https://api.github.com/users/sunsun314/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-28T11:51:57Z","updated_at":"2018-11-28T20:00:35Z","closed_at":null,"author_association":"NONE","body":"I test the xml with this case\r\n```\r\n<yyyy>\r\n   <xxxxx wer=\"sdfdsf\">2</xxxxx>\r\n</yyyy>\r\n```\r\n```\r\ntype testXml struct {\r\n\tSelf     *SelfXml        `xml:\"xxxxx\"`\r\n}\r\n\r\ntype SelfXml struct {\r\n\tValue    string   `xml:\"xxx\"`\r\n}\r\n```\r\nI tested it and find out that the unexpected xxxxx.-wer can not be identified by UnknownXMLTags  \r\nThan I debug the test case and find  reflect.Indirect can not reflect the *SelfXml into a valid struct  \r\nI can only pass this test when I changed *SelfXml into SelfXml\r\nIs their some way to fix this issue? \r\n"},"comment":{"url":"https://api.github.com/repos/clbanning/checkxml/issues/comments/442584663","html_url":"https://github.com/clbanning/checkxml/issues/3#issuecomment-442584663","issue_url":"https://api.github.com/repos/clbanning/checkxml/issues/3","id":442584663,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjU4NDY2Mw==","user":{"login":"clbanning","id":426304,"node_id":"MDQ6VXNlcjQyNjMwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/426304?v=4","gravatar_id":"","url":"https://api.github.com/users/clbanning","html_url":"https://github.com/clbanning","followers_url":"https://api.github.com/users/clbanning/followers","following_url":"https://api.github.com/users/clbanning/following{/other_user}","gists_url":"https://api.github.com/users/clbanning/gists{/gist_id}","starred_url":"https://api.github.com/users/clbanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clbanning/subscriptions","organizations_url":"https://api.github.com/users/clbanning/orgs","repos_url":"https://api.github.com/users/clbanning/repos","events_url":"https://api.github.com/users/clbanning/events{/privacy}","received_events_url":"https://api.github.com/users/clbanning/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T20:00:35Z","updated_at":"2018-11-28T20:00:35Z","author_association":"OWNER","body":"Using the latest- v1.3 - release run this:\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/clbanning/checkxml\"\r\n)\r\n\r\nvar a = []byte(`<yyyy>\r\n   <xxxxx wer=\"sdfdsf\">2</xxxxx>\r\n</yyyy>`)\r\n\r\ntype testXml struct {\r\n\tSelf     *SelfXml        `xml:\"xxxxx\"`\r\n}\r\n\r\ntype SelfXml struct {\r\n\tValue    string   `xml:\"xxx\"`\r\n}\r\n\r\n\r\nfunc main() {\r\n\tvar self SelfXml\r\n\ttest := testXml{\r\n\t\tSelf: &self,\r\n\t}\r\n\r\n\ttags, _, err := checkxml.UnknownXMLTags(a, test)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"err:\", err)\r\n\t}\r\n\tfmt.Printf(\"%v\\n\", tags)\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"clbanning"}}