Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Banning committed Feb 21, 2017
1 parent 375bcc5 commit 29f6eaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ Unmarshal function for the specified struct definition.
}

e := new(elem)
result, _, _ := MissingXMLTags([]byte(data), e)
result, root, _ := MissingXMLTags([]byte(data), e)
// result: [elem2.another elem3]
// root: doc

result, _, _ = UnknownXMLTags([]byte(data), e)
result, root, _ = UnknownXMLTags([]byte(data), e)
// result: [elem2.notes elem4]
// root: doc

NOTE: this package is dependent upon github.com/clbanning/mxj.

Expand Down
6 changes: 4 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ Unmarshal function for the specified struct definition.
}
e := new(elem)
result, _, _ := MissingXMLTags([]byte(data), e)
result, root, _ := MissingXMLTags([]byte(data), e)
// result: [elem2.another elem3]
// root: doc
result, _, _ = UnknownXMLTags([]byte(data), e)
result, root, _ = UnknownXMLTags([]byte(data), e)
// result: [elem2.notes elem4]
// root: doc
NOTE: this package is dependent upon github.com/clbanning/mxj.
*/
Expand Down

0 comments on commit 29f6eaf

Please sign in to comment.