xuri / xgen

XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
BSD 3-Clause "New" or "Revised" License
339 stars 80 forks source link

xsd:byte should be int8 instead of byte in Go #58

Closed ArFe closed 1 year ago

ArFe commented 2 years ago

When parsing the "xsd:byte" tag, it parses byte. Byte is unsigned in go, so it should be int8 (signed instead).

Steps to reproduce the issue:

  1. Have an xsd with a byte tag
  2. try to convert to struct

Describe the results you received: struct with byte Describe the results you expected: struct with int8 Output of go version: go version go1.18 linux/amd64 xgen version or commit ID: 98e2a901798bddb93c5e532c98afc1f5f139d47e

mpkondrashin commented 1 year ago

Not solved yet?

xuri commented 1 year ago

Sorry for the late reply. This issue has been fixed, please upgrade to the master branch code.