Permalink
Browse files

Use xml.NewDecoder instead of Unmarshal for io.Reader

  • Loading branch information...
tobi committed Sep 17, 2012
1 parent 9d87edc commit 51516a6ad727c326decb5d32b91a9abd00a935c3
Showing with 1 addition and 2 deletions.
  1. +1 −2 xrds.go
View
@@ -29,7 +29,7 @@ type XRDS struct {
// Return the OP EndPoint and, if found, the Claimed Identifier
func ParseXRDS(r io.Reader) (string, string) {
XRDS := new(XRDS)
- err := xml.Unmarshal(r, XRDS)
+ err := xml.NewDecoder(r).Decode(XRDS)
if err != nil {
//fmt.Printf(err.String())
return "", ""
@@ -51,7 +51,6 @@ func ParseXRDS(r io.Reader) (string, string) {
return "", ""
}
-
func StringTableContains(t []string, s string) bool {
for _, v := range t {
if v == s {

0 comments on commit 51516a6

Please sign in to comment.