-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
refactor: simplify the conversion from int to time.Duration as suggested by the golang offical doc. #294
Conversation
感谢您提出Pull Request,我会尽快Review。我会在1-2日内进行查看或者回复,如果遇到节假日可能会处理较慢,敬请谅解。 |
Pull Request Test Coverage Report for Build 7210996089
💛 - Coveralls |
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. |
1 |
component/serverlist/sync.go
Outdated
return nil, err | ||
} | ||
c.Timeout = duration | ||
c.Timeout = time.Duration(appConfigFunc().SyncServerTimeout) * time.Second |
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.
c.Timeout = time.Duration(appConfigFunc().SyncServerTimeout) * time.Second | |
c.Timeout = time.Duration(appConfig.SyncServerTimeout) * time.Second |
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
32f4a8c
to
7e5c6ae
Compare
…ted by the golang offical doc. https://pkg.go.dev/time#pkg-constants Signed-off-by: Cattī Crūdēlēs <17695588+wzy9607@users.noreply.github.com>
7e5c6ae
to
d00329d
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.
LGTM
refactor: simplify the conversion from int to time.Duration as suggested by the golang offical doc.
见 https://pkg.go.dev/time#pkg-constants