Skip to content

Commit

Permalink
Maps more XSD types
Browse files Browse the repository at this point in the history
  • Loading branch information
c4milo committed Jan 3, 2014
1 parent c91bf3a commit 5bbded5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
32 changes: 20 additions & 12 deletions gowsdl.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,26 @@ func replaceReservedWords(identifier string) string {
}

var xsd2GoTypes = map[string]string{
"string": "string",
"decimal": "float64",
"integer": "int64",
"int": "int32",
"short": "int16",
"byte": "int8",
"long": "int64",
"boolean": "bool",
"dateTime": "time.Time",
"date": "time.Time",
"time": "time.Time",
"anyType": "interface{}",
"string": "string",
"float": "float32",
"double": "float64",
"decimal": "float64",
"integer": "int32",
"int": "int32",
"short": "int16",
"byte": "int8",
"long": "int64",
"boolean": "bool",
"dateTime": "time.Time",
"date": "time.Time",
"time": "time.Time",
"base64Binary": "[]byte",
"hexBinary": "[]byte",
"unsignedInt": "uint32",
"unsignedShort": "uint16",
"unsignedByte": "byte",
"unsignedLong": "uint64",
"anyType": "interface{}",
}

func toGoType(xsdType string) string {
Expand Down
2 changes: 2 additions & 0 deletions types_tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var typesTmpl = `
{{end}}
package main
//Generated by https://github.com/c4milo/gowsdl
//Do not modify
import (
"encoding/xml"
//"time"
Expand Down

0 comments on commit 5bbded5

Please sign in to comment.