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

Fix warning messages in config.go and client.go #1963

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

hanizang77
Copy link
Contributor

  • Fix non-constant format string warning in config.go fmt.Errorf calls
  • Fix integer format specifier in client.go Printf statement

Copy link
Member

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

@hanizang77 기여 감사합니다! 마이너한 코멘트가 있습니다. 살펴보시고 필요시 적절히 업데이트해주세요.

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)
Copy link
Member

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) 로 정리해도, 코드 길이를 줄일 수 있어서 좋을 것 같긴합니다. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

github가 익숙치 않아 보여드리고 싶지 않았던 시험작이 Commit되고 말았군요. 말씀하신것처럼 굳이 상수로 지정할 필요가 없습니다.


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."
Copy link
Member

Choose a reason for hiding this comment

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

주석 처리는 필요 없는 항목인 것 같습니다. 삭제해주세요. ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

주석 삭제하고 새로운 버전으로 Commit 하겠습니다.

Copy link
Member

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@seokho-son
Copy link
Member

@hanizang77 커밋 스쿼싱 가능하신가요~? :)

- Fix non-constant format string warning in config.go fmt.Errorf calls
- Fix integer format specifier in client.go Printf statement
@hanizang77
Copy link
Contributor Author

@seokho-son 스쿼시해서 force-push 했습니다 :-)

@seokho-son
Copy link
Member

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Feb 4, 2025
@cb-github-robot cb-github-robot merged commit 00b5fd6 into cloud-barista:main Feb 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants