Fixes for Go code generation.
Timestamps have to be int64 (duh), and have to include json:"" around the field name for it to actually work (the documentation is terrible on this).
This commit is contained in:
parent
72fd7f827a
commit
89e164e1e4
|
@ -257,7 +257,7 @@ public class Constants {
|
||||||
@GoDataType("[]CardSetData")
|
@GoDataType("[]CardSetData")
|
||||||
CARD_SETS("css"),
|
CARD_SETS("css"),
|
||||||
CLIENT_NAME("cn"),
|
CLIENT_NAME("cn"),
|
||||||
@GoDataType("int")
|
@GoDataType("int64")
|
||||||
CONNECTED_AT("ca"),
|
CONNECTED_AT("ca"),
|
||||||
@GoDataType("bool")
|
@GoDataType("bool")
|
||||||
ERROR("e"),
|
ERROR("e"),
|
||||||
|
@ -277,7 +277,7 @@ public class Constants {
|
||||||
HAND("h"),
|
HAND("h"),
|
||||||
@DuplicationAllowed
|
@DuplicationAllowed
|
||||||
ID_CODE(AjaxRequest.ID_CODE),
|
ID_CODE(AjaxRequest.ID_CODE),
|
||||||
@GoDataType("int")
|
@GoDataType("int64")
|
||||||
IDLE("idl"),
|
IDLE("idl"),
|
||||||
IP_ADDRESS("IP"),
|
IP_ADDRESS("IP"),
|
||||||
/**
|
/**
|
||||||
|
@ -554,7 +554,7 @@ public class Constants {
|
||||||
*/
|
*/
|
||||||
@DuplicationAllowed
|
@DuplicationAllowed
|
||||||
SIGIL(AjaxResponse.SIGIL),
|
SIGIL(AjaxResponse.SIGIL),
|
||||||
@GoDataType("int")
|
@GoDataType("int64")
|
||||||
TIMESTAMP("ts"),
|
TIMESTAMP("ts"),
|
||||||
@DuplicationAllowed
|
@DuplicationAllowed
|
||||||
@GoDataType("bool")
|
@GoDataType("bool")
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class UpdateGoConstants {
|
||||||
private static final String enumTailFmt = ")\r\n";
|
private static final String enumTailFmt = ")\r\n";
|
||||||
|
|
||||||
private static final String structHeaderFmt = "type %s struct {\r\n";
|
private static final String structHeaderFmt = "type %s struct {\r\n";
|
||||||
private static final String structValueFmt = "\t%s %s `%s`\r\n";
|
private static final String structValueFmt = "\t%s %s `json:\"%s\"`\r\n";
|
||||||
private static final String structTailFmt = "}\r\n";
|
private static final String structTailFmt = "}\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";
|
||||||
|
|
Loading…
Reference in New Issue