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

feat: config引数を追加、既存引数の変更 #23

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

book000
Copy link
Member

@book000 book000 commented Nov 14, 2024

@book000 book000 requested a review from Copilot November 14, 2024 02:47
@book000 book000 enabled auto-merge (squash) November 14, 2024 02:47
@book000 book000 merged commit 6c15917 into master Nov 14, 2024
2 checks passed
@book000 book000 deleted the feat/config-path-arg branch November 14, 2024 02:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 suggestion.

configPath = "data/config.yaml"
// 設定ファイルを読み込む。設定ファイルパスは環境変数 CONFIG_PATH または引数 -config で指定し、指定されていない場合は "data/config.yaml" とする。
if *configPath == "" {
*configPath = "data/config.yaml"
Copy link
Preview

Copilot AI Nov 14, 2024

Choose a reason for hiding this comment

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

Avoid modifying the flag variable directly. Use a local variable for the default path assignment.

Suggested change
*configPath = "data/config.yaml"
configFilePath := *configPath; if configFilePath == "" { configFilePath = "data/config.yaml" }

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

引数で設定ファイルを指定できるようにする
1 participant