-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix warning messages in config.go and client.go #1963
Conversation
hanizang77
commented
Feb 3, 2025
- Fix non-constant format string warning in config.go fmt.Errorf calls
- Fix integer format specifier in client.go Printf statement
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.
@hanizang77 기여 감사합니다! 마이너한 코멘트가 있습니다. 살펴보시고 필요시 적절히 업데이트해주세요.
src/core/common/config.go
Outdated
errString := id + " config is not found from Key-value store. Envirionment variable will be used." | ||
|
||
const errMsgFormat = "%s config is not found from Key-value store. Environment variable will be used." | ||
errString := fmt.Sprintf(errMsgFormat, id) |
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.
errMsgFormat 가 이후에도 재사용되지 않는다면 굳이 상수로 지정할 필요가 있을까요?
errString := fmt.Sprintf(메시지, id) 로 정리해도, 코드 길이를 줄일 수 있어서 좋을 것 같긴합니다. :)
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.
github가 익숙치 않아 보여드리고 싶지 않았던 시험작이 Commit되고 말았군요. 말씀하신것처럼 굳이 상수로 지정할 필요가 없습니다.
src/core/common/config.go
Outdated
|
||
const errMsgFormat = "%s config is not found from Key-value store. Environment variable will be used." | ||
errString := fmt.Sprintf(errMsgFormat, id) | ||
// errString := id + " config is not found from Key-value store. Envirionment variable will be used." |
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.
주석 처리는 필요 없는 항목인 것 같습니다. 삭제해주세요. ^^
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.
주석 삭제하고 새로운 버전으로 Commit 하겠습니다.
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! :)
@hanizang77 커밋 스쿼싱 가능하신가요~? :) |
- Fix non-constant format string warning in config.go fmt.Errorf calls - Fix integer format specifier in client.go Printf statement
@seokho-son 스쿼시해서 force-push 했습니다 :-) |
/approve |