Check err for xml.MarshalIndent
This commit is contained in:
parent
ecf993bcc0
commit
16658e845d
5
main.go
5
main.go
|
@ -158,7 +158,10 @@ func main() {
|
||||||
Updated: item.Date.Format(time.RFC3339),
|
Updated: item.Date.Format(time.RFC3339),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
out, _ := xml.MarshalIndent(feed, "", " ")
|
out, err := xml.MarshalIndent(feed, "", " ")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
fmt.Println(string(out))
|
fmt.Println(string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue