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")
|
||||
CARD_SETS("css"),
|
||||
CLIENT_NAME("cn"),
|
||||
@GoDataType("int")
|
||||
@GoDataType("int64")
|
||||
CONNECTED_AT("ca"),
|
||||
@GoDataType("bool")
|
||||
ERROR("e"),
|
||||
|
@ -277,7 +277,7 @@ public class Constants {
|
|||
HAND("h"),
|
||||
@DuplicationAllowed
|
||||
ID_CODE(AjaxRequest.ID_CODE),
|
||||
@GoDataType("int")
|
||||
@GoDataType("int64")
|
||||
IDLE("idl"),
|
||||
IP_ADDRESS("IP"),
|
||||
/**
|
||||
|
@ -554,7 +554,7 @@ public class Constants {
|
|||
*/
|
||||
@DuplicationAllowed
|
||||
SIGIL(AjaxResponse.SIGIL),
|
||||
@GoDataType("int")
|
||||
@GoDataType("int64")
|
||||
TIMESTAMP("ts"),
|
||||
@DuplicationAllowed
|
||||
@GoDataType("bool")
|
||||
|
|
|
@ -48,7 +48,7 @@ public class UpdateGoConstants {
|
|||
private static final String enumTailFmt = ")\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 msgHeaderFmt = "var %sMsgs = map[string]string{\r\n";
|
||||
|
|
Loading…
Reference in New Issue