mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 18:16:28 +00:00
feat[golang]: compatible field of inside protocol class
This commit is contained in:
1 parent
efd01781e2
commit
a917f84e3f
2 files changed
+3
-9
No files matched your search
@@ -142,7 +142,7 @@ public abstract class GenerateCppUtils {
|
||||
protocolClazzName, protocolId, protocolClazzName, writeObject.trim(), protocolClazzName, readObject.trim());
|
||||
|
||||
var outputPath = StringUtils.format("{}/{}/{}.h"
|
||||
, GenerateCppUtils.protocolOutputPath
|
||||
, protocolOutputPath
|
||||
, GenerateProtocolPath.getProtocolPath(protocolId)
|
||||
, protocolClazzName);
|
||||
FileUtils.writeStringToFile(new File(outputPath), protocolTemplate, true);
|
||||
|
||||
@@ -126,14 +126,8 @@ public abstract class GenerateGoUtils {
|
||||
, protocolClazzName, protocolId, protocolClazzName, protocolClazzName
|
||||
, writeObject.trim(), protocolClazzName, protocolClazzName, readObject.trim());
|
||||
|
||||
var protocolPath = GenerateProtocolPath.protocolAbsolutePath(protocolId);
|
||||
if (StringUtils.isEmpty(protocolPath)) {
|
||||
protocolPath = protocolClazzName;
|
||||
} else if (protocolPath.contains(StringUtils.SLASH)) {
|
||||
protocolPath = StringUtils.substringAfterLast(protocolPath, StringUtils.SLASH);
|
||||
}
|
||||
var outputPath = StringUtils.format("{}/{}/{}.go", protocolOutputPath, protocolOutputRootPath, protocolClazzName);
|
||||
FileUtils.writeStringToFile(outputPath, protocolTemplate, true);
|
||||
var outputPath = StringUtils.format("{}/{}.go", protocolOutputPath, protocolClazzName);
|
||||
FileUtils.writeStringToFile(new File(outputPath), protocolTemplate, true);
|
||||
}
|
||||
|
||||
private static String fieldDefinition(ProtocolRegistration registration) {
|
||||
|
||||
Reference in new issue
Block a user