just type everything as strings for go
This commit is contained in:
parent
b5c9bffeb1
commit
6a6172742b
|
@ -40,9 +40,8 @@ import net.socialgamer.cah.Constants.Localizable;
|
||||||
*/
|
*/
|
||||||
public class UpdateGoConstants {
|
public class UpdateGoConstants {
|
||||||
|
|
||||||
private static final String enumHeaderFmt =
|
private static final String enumHeaderFmt = "// %s\r\nconst (\r\n";
|
||||||
"type %s string\r\nconst (\r\n";
|
private static final String enumValueFmt = "\t%s_%s = \"%s\"\r\n";
|
||||||
private static final String enumValueFmt = "\t%s_%s %s = \"%s\"\r\n";
|
|
||||||
private static final String enumTailFmt = ")\r\n";
|
private static final String enumTailFmt = ")\r\n";
|
||||||
|
|
||||||
private static final String msgHeaderFmt = "var %sMsgs = map[string]string{\r\n";
|
private static final String msgHeaderFmt = "var %sMsgs = map[string]string{\r\n";
|
||||||
|
@ -87,7 +86,7 @@ public class UpdateGoConstants {
|
||||||
final Map<String, String> values = getEnumValues(c);
|
final Map<String, String> values = getEnumValues(c);
|
||||||
for (final String key : values.keySet()) {
|
for (final String key : values.keySet()) {
|
||||||
final String value = values.get(key);
|
final String value = values.get(key);
|
||||||
writer.format(enumValueFmt, cName, key, cName, value);
|
writer.format(enumValueFmt, cName, key, value);
|
||||||
}
|
}
|
||||||
writer.println(enumTailFmt);
|
writer.println(enumTailFmt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue