quicktype-core 23.0.47 → 23.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/language/Golang.js +9 -3
- package/package.json +1 -1
package/dist/language/Golang.js
CHANGED
|
@@ -215,10 +215,16 @@ class GoRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
215
215
|
this.emitPackageDefinitons(false);
|
|
216
216
|
this.emitDescription(this.descriptionForType(e));
|
|
217
217
|
this.emitLine("type ", enumName, " string");
|
|
218
|
+
this.ensureBlankLine();
|
|
218
219
|
this.emitLine("const (");
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
let columns = [];
|
|
221
|
+
this.forEachEnumCase(e, "none", (name, jsonName) => {
|
|
222
|
+
columns.push([
|
|
223
|
+
[name, " "],
|
|
224
|
+
[enumName, ' = "', (0, Strings_1.stringEscape)(jsonName), '"']
|
|
225
|
+
]);
|
|
226
|
+
});
|
|
227
|
+
this.indent(() => this.emitTable(columns));
|
|
222
228
|
this.emitLine(")");
|
|
223
229
|
this.endFile();
|
|
224
230
|
}
|