Skip to content

Commit 5fad50f

Browse files
committed
⬆️ Update json-to-go
1 parent 7d1d39b commit 5fad50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vendor/json-to-go.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
321321
switch (typeof val)
322322
{
323323
case "string":
324-
if (/\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(\+\d\d:\d\d|Z)/.test(val))
324+
if (/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(\+\d\d:\d\d|Z)$/.test(val))
325325
return "time.Time";
326326
else
327327
return "string";

0 commit comments

Comments
 (0)