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
merged 2 commits into from Sep 5, 2016

Conversation

Projects
None yet
2 participants
@ikawaha
Copy link
Contributor

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

ikawaha Sep 3, 2016

Contributor

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

@raphael

This comment has been minimized.

Copy link
Member

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
Details

@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