udpate type mapping for go, fix indention in go model

This commit is contained in:
wing328
2016-04-11 23:44:06 +08:00
parent 87af119d9a
commit d8963d0a85
11 changed files with 28 additions and 26 deletions

View File

@@ -79,11 +79,12 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.clear();
typeMapping.put("integer", "int32");
typeMapping.put("long", "int64");
typeMapping.put("number", "float32");
typeMapping.put("float", "float32");
typeMapping.put("double", "float64");
typeMapping.put("boolean", "bool");
typeMapping.put("string", "string");
typeMapping.put("Date", "time.Time");
typeMapping.put("date", "time.Time");
typeMapping.put("DateTime", "time.Time");
typeMapping.put("password", "string");
typeMapping.put("File", "*os.File");
@@ -91,6 +92,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
// map binary to string as a workaround
// the correct solution is to use []byte
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
importMapping = new HashMap<String, String>();
importMapping.put("time.Time", "time");