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

Fix float to float32 for Golang #43

Closed themaxi closed 2 years ago

themaxi commented 2 years ago

Description

My XSD contains xs:float type:

<xs:element type="xs:float" name="Mark"/>

Generates to:

Mark                      *Float                     `xml:"Mark"`

After this fix it generates to

Mark                      float32                     `xml:"Mark"`

Types of changes

xuri commented 2 years ago

LGTM, thanks for your PR.