Closed luizvnasc closed 4 years ago
Thanks for your issue. Could you provide more info about XSD? Maybe I need more context to find the reason.
The xsd is here.
I found other problem that all, or almost all, type that is created is a pointer in the struct. So it's very difficult to manage the struct where you have a lot of pointers or pointers of pointers. But it probably could be an other issue to duscuss.
Hi @luizvnasc, I have fixed it, please try to upgrade the command line tools with the master branch code.
Hi @xuri, thanks, but as you can see in #4 the bug is still happening. What I did:
$ go get -u github.com/xuri/xgen
go: github.com/xuri/xgen upgrade => v0.0.0-20200517172312-9d8630233132
go: finding module for package golang.org/x/net/html/charset
go: found golang.org/x/net/html/charset in golang.org/x/net v0.0.0-20200513185701-a91f0712d120
go: golang.org/x/text upgrade => v0.3.2
$ xgen -l Go -p evento -o ./v1.00/evento/ -i ./schemas/Evento_AlertaFisco_v1.01/e400101_v1.00.xsd
done
I'm trying to generate a struct for the bellow element but the result wasn't the expected. Element
Generated code :
Expected result:
Output of
go version
:Environment details (OS, physical, etc.):