metaleap / go-xsd

[stable since 2013] a lib for loading XML Schema Definition (XSD) files ➜ plus, a tool `makepkg` to code-generate from any *.xsd your Go package with all needed `struct`s to readily `xml.Unmarshal()` documents into, based on the XSD's schema definitions. NOT REALLY MAINTAINED FOR YEARS NOW: try the forks if running into issues.
http://www.reddit.com/r/golang/comments/12g6sl/is_there_a_tool_that_generates_go_source_code_for/
MIT License
216 stars 66 forks source link

Make loadSchema(io.Reader....) public #32

Open onitake opened 7 years ago

onitake commented 7 years ago

In some situations, it is desirable to allow loading a schema from something else than the supported URIs.

For example, a program could have XSD definitions built in, so they don't have to be fetched from a file or the internet.

Please make loadSchema(r io.Reader, loadUri, localPath string) in xsd-schema.go public or add a new constructor that allows passing in a map of readers for the included schemas.