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
217 stars 66 forks source link

Import cycle not allowed #28

Closed arthurgustin closed 7 years ago

arthurgustin commented 7 years ago

Hello, in my job I need to implement the CSW 3 norm in Go, and I found your library. However, with this command: go run main.go -uri="http://schemas.opengis.net/cat/csw/3.0/cswAll.xsd"

I get

import cycle not allowed
package github.com/metaleap/go-xsd-pkg/schemas.opengis.net/cat/csw/3.0/cswAll.xsd_go
        imports github.com/metaleap/go-xsd-pkg/schemas.opengis.net/gml/3.2.1/gml.xsd_go
        imports github.com/metaleap/go-xsd-pkg/schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd_go
        imports github.com/metaleap/go-xsd-pkg/schemas.opengis.net/iso/19139/20070417/gco/gco.xsd_go
        imports github.com/metaleap/go-xsd-pkg/schemas.opengis.net/gml/3.2.1/gml.xsd_go

exit status 1

What do you think about it ? Maybe I could trick the program by removing a dependancy but if you have an idea I'd be glad to know :)

metaleap commented 7 years ago

No idea off the top of my head but also consider trying the various forks of go-xsd that appeared over the years: https://github.com/metaleap/go-xsd/network --- I'm not maintaining/supporting/even-pondering this package at all nowadays =)