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

Update main.go #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewTemporalCloudProvider(temporalCloudAdapter ITemporalCloudAdapter, config

err := temporalCloudAdapter.Flags().Parse(os.Args)
if err != nil {
return nil, fmt.Errorf("unable to parse flags: %v", err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error message wording was changed from 'unable to parse flags' to 'failed to parse flags' for consistency. Consider defining common error messages as constants if they are reused.

return nil, fmt.Errorf("failed to parse flags: %v", err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider using a constant for error messages to ensure consistency and easy modifications across the codebase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider using consistent phrasing for error messages. Ensure that the change from 'unable to' to 'failed to' is applied consistently across all functions in this project for uniformity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider using consistent phrasing for error messages. Ensure that the change from 'unable to' to 'failed to' is applied consistently across all functions in this project for uniformity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changing the error message wording to 'failed to parse flags' aligns the language more closely with conventional error handling messages. Ensure this pattern is consistent across similar error handling scenarios.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider rewording the error message for clarity and consistency with other messages, e.g., 'failed to parse flags'.

}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error message was changed from 'unable to parse flags' to 'failed to parse flags'. This change improves the uniformity of error messages throughout the function, as all other error messages begin with 'failed to...'. This consistency can help with debugging and log analysis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider using a constant for error messages to ensure consistency across the codebase and make it easier to manage these messages.


Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use 'failed' consistently in error messages; consider defining a constant for repeated strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Verify the change from 'unable to parse flags' to 'failed to parse flags' aligns with the project's error message conventions.

config, err := LoadConfig(configPath)
Expand Down
Loading