-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: add ValueString() to all literal types #102
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
=======================================
Coverage ? 62.94%
=======================================
Files ? 44
Lines ? 10265
Branches ? 0
=======================================
Hits ? 6461
Misses ? 3519
Partials ? 285 ☔ View full report in Codecov by Sentry. |
6a61c57
to
966a5dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great to me, just a couple nit-picks
} | ||
return fmt.Sprintf("[%s]", strings.Join(items, ", ")) | ||
} | ||
return fmt.Sprintf("%v", t.Value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a test that hits this so the codecov warning goes away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, not done. Turns out that map literals go through a different path. I'm not sure how to get it to visit this line.
date := civil.Date{Year: 1970, Month: time.January, Day: 1} | ||
date = date.AddDays(int(d)) | ||
return date.String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the benefit to this over just using time
like we were doing before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding days to time.t can be messed up by daylight savings time. Civil date's base type is days so it isn't affected.
9b9759b
to
5d0b3d7
Compare
Adds the functionality QueryString() functionality requested in #100 .