quicktype-core 23.0.106 → 23.0.107
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 +4 -1
- package/package.json +1 -1
package/dist/language/Golang.js
CHANGED
|
@@ -221,7 +221,9 @@ class GoRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
221
221
|
]);
|
|
222
222
|
usedTypes.add(goType.toString());
|
|
223
223
|
});
|
|
224
|
-
this.emitPackageDefinitons(false, usedTypes.has("time.Time") || usedTypes.has("*,time.Time") || usedTypes.has("[],time.Time")
|
|
224
|
+
this.emitPackageDefinitons(false, usedTypes.has("time.Time") || usedTypes.has("*,time.Time") || usedTypes.has("[],time.Time")
|
|
225
|
+
? new Set(["time"])
|
|
226
|
+
: undefined);
|
|
225
227
|
this.emitDescription(this.descriptionForType(c));
|
|
226
228
|
this.emitStruct(className, columns);
|
|
227
229
|
this.endFile();
|
|
@@ -514,6 +516,7 @@ func marshalUnion(pi *int64, pf *float64, pb *bool, ps *string, haveArray bool,
|
|
|
514
516
|
const mapping = new Map();
|
|
515
517
|
mapping.set("time.Time", "time");
|
|
516
518
|
mapping.set("*,time.Time", "time");
|
|
519
|
+
mapping.set("[],time.Time", "time");
|
|
517
520
|
this.forEachClassProperty(c, "none", (_name, _jsonName, p) => {
|
|
518
521
|
const goType = this.propertyGoType(p);
|
|
519
522
|
usedTypes.add(goType.toString());
|