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

empty datetime shouldn't be converted to epoch time #47

Merged
merged 1 commit into from
Feb 11, 2019
Merged

empty datetime shouldn't be converted to epoch time #47

merged 1 commit into from
Feb 11, 2019

Conversation

mjvm
Copy link
Contributor

@mjvm mjvm commented Feb 11, 2019

fixes #46

@codecov
Copy link

codecov bot commented Feb 11, 2019

Codecov Report

Merging #47 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   89.25%   89.33%   +0.08%     
==========================================
  Files          10       10              
  Lines        1629     1632       +3     
==========================================
+ Hits         1454     1458       +4     
+ Misses        146      145       -1     
  Partials       29       29
Impacted Files Coverage Δ
format.go 73.58% <100%> (+1.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc2668d...28d9b38. Read the comment docs.

@casualjim
Copy link
Member

the changes look good, but can you address the linter comment?

format.go Outdated
return ParseDateTime(data.(string))
input := data.(string)
if len(input) == 0 {
return nil, fmt.Errorf("empty string it's invalid datetime format")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should read "empty string is an invalid datetime format"

…be accepted as valid

        * changes error message
        * fixes scopelint issue

Signed-off-by: Mario Morgado <[email protected]>
@mjvm
Copy link
Contributor Author

mjvm commented Feb 11, 2019

a new commit addresses the raised issues.

@casualjim casualjim merged commit bb51295 into go-openapi:master Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

empty DateTime shouldn't be valid
4 participants