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

Use Duration.Truncate for truncating precision #2711

Merged
merged 2 commits into from
May 4, 2021

Conversation

y-yagi
Copy link
Contributor

@y-yagi y-yagi commented May 3, 2021

Duration.Truncate was added in Go 1.9 and Gin required Go version 1.13+ now.
So we can use Duration.Truncate.

  • With pull requests:
    • Open your pull request against master
    • Your pull request should have no more than two commits, if not you should squash them.
    • It should pass all tests in the available continuous integration systems such as TravisCI.
    • You should add/modify tests to cover your proposed code changes.
    • If your pull request contains a new feature, please document it on the README.

`Duration.Truncate` was added in Go 1.9 and Gin required Go version 1.13+ now.
So we can use `Duration.Truncate`.
@codecov
Copy link

codecov bot commented May 3, 2021

Codecov Report

Merging #2711 (ec030a0) into master (5452a1d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2711   +/-   ##
=======================================
  Coverage   98.67%   98.67%           
=======================================
  Files          41       41           
  Lines        2036     2036           
=======================================
  Hits         2009     2009           
  Misses         15       15           
  Partials       12       12           
Impacted Files Coverage Δ
logger.go 100.00% <100.00%> (ø)

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 5452a1d...ec030a0. Read the comment docs.

@appleboy appleboy requested review from appleboy and thinkerou May 3, 2021 03:38
@appleboy appleboy added this to the v1.8 milestone May 3, 2021
Copy link
Member

@thinkerou thinkerou left a comment

Choose a reason for hiding this comment

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

lgtm

@thinkerou thinkerou merged commit 4fe5f3e into gin-gonic:master May 4, 2021
@y-yagi y-yagi deleted the use-duration-truncate branch May 8, 2021 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants