New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setting a default value to datetime #758

merged 2 commits into from Sep 5, 2016


None yet
2 participants
Copy link

ikawaha commented Sep 3, 2016

issue #726

@@ -89,4 +107,8 @@ if ut.Foo == nil {
hashAssignmentCode = `if ut.Foo == nil {
ut.Foo = map[string]string{"bar": "baz"}
datetimeAssignmentCode = `var defaultFoo, _ = time.Parse(time.RFC3339, "1978-06-30T10:00:00+09:00")

This comment has been minimized.


ikawaha Sep 3, 2016


goagen validated the format of the date time string , so genarated code discards the error of time.Parse().


This comment has been minimized.

Copy link

raphael commented Sep 5, 2016

This is great, thank you!

@raphael raphael merged commit ced7e46 into goadesign:master Sep 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@ikawaha ikawaha deleted the ikawaha:issue726 branch Sep 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment