Skip to content

Commit

Permalink
⬆️ Update json-to-go
Browse files Browse the repository at this point in the history
  • Loading branch information
nkmr-jp committed Nov 3, 2023
1 parent 7d1d39b commit 5fad50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/json-to-go.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
switch (typeof val)
{
case "string":
if (/\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(\+\d\d:\d\d|Z)/.test(val))
if (/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(\+\d\d:\d\d|Z)$/.test(val))
return "time.Time";
else
return "string";
Expand Down

0 comments on commit 5fad50f

Please sign in to comment.