Skip to content
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


Copy link

@ikawaha 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
Author Contributor

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

Copy link

@raphael raphael commented Sep 5, 2016

This is great, thank you!

@raphael raphael merged commit ced7e46 into goadesign:master Sep 5, 2016
1 check passed
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
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants