apolloconfig / agollo

🚀Go client for ctrip/apollo (https://github.com/apolloconfig/apollo)
https://www.apolloconfig.com
Apache License 2.0
708 stars 189 forks source link

refactor: simplify the conversion from int to time.Duration as suggested by the golang offical doc. #294

Closed wzy9607 closed 8 months ago

wzy9607 commented 10 months ago

https://pkg.go.dev/time#pkg-constants

To convert an integer number of units to a Duration, multiply:

seconds := 10
fmt.Print(time.Duration(seconds)*time.Second) // prints 10s
mergify[bot] commented 10 months ago

感谢您提出Pull Request,我会尽快Review。我会在1-2日内进行查看或者回复,如果遇到节假日可能会处理较慢,敬请谅解。

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 7210996089


Changes Missing Coverage Covered Lines Changed/Added Lines %
component/remote/abs.go 0 1 0.0%
<!-- Total: 1 2 50.0% -->
Totals Coverage Status
Change from base Build 5706641819: 0.2%
Covered Lines: 1289
Relevant Lines: 1733

💛 - Coveralls
stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

wzy9607 commented 8 months ago

1