使用XSD验证Golang XML?

We have a requirement to validate a given XML file against an XSD for an assertion. I am looking for an equivalent solution in GoLang.

We understand default XML Marshaling ,UnMarhsalling features of Golang. But i believe XSD validation is different and i am not finding any suitable package. any pointers would be helpful

Mybe that package helps. Not sure about the maturity of it thoug... https://godoc.org/github.com/krolaw/xsd

Edit: Well the gihub page tells you it is not mature for production. "XSD is far from complete"

If it is not required that you do it with go code, then a call to xmllint may be an option. http://xmlsoft.org/xmllint.html