this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lexgen: more consistency between JSON and CBOR tags

+2 -2
+2 -2
lex/gen.go
··· 1101 1101 fmt.Fprintf(w, "type %s struct {\n", name) 1102 1102 1103 1103 if ts.record { 1104 - fmt.Fprintf(w, "\tLexiconTypeID string `json:\"$type\" cborgen:\"$type,const=%s\"`\n", ts.id) 1104 + fmt.Fprintf(w, "\tLexiconTypeID string `json:\"$type,const=%s\" cborgen:\"$type,const=%s\"`\n", ts.id, ts.id) 1105 1105 } else { 1106 1106 fmt.Fprintf(w, "\tLexiconTypeID string `json:\"$type,omitempty\" cborgen:\"$type,omitempty\"`\n") 1107 1107 } ··· 1139 1139 } 1140 1140 } 1141 1141 1142 - fmt.Fprintf(w, "\t%s %s%s `json:\"%s%s\" cborgen:\"%s\"`\n", goname, ptr, tname, k, omit, k) 1142 + fmt.Fprintf(w, "\t%s %s%s `json:\"%s%s\" cborgen:\"%s%s\"`\n", goname, ptr, tname, k, omit, k, omit) 1143 1143 return nil 1144 1144 }); err != nil { 1145 1145 return err