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

chore: unnecessary use of fmt.Sprintf #2513

Closed
wants to merge 2 commits into from
Closed

chore: unnecessary use of fmt.Sprintf #2513

wants to merge 2 commits into from

Conversation

testwill
Copy link
Contributor


Description

unnecessary use of fmt.Sprintf

Fixes #0000 (fill in)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • Test A
  • Test B

Checklist:

  • This contribution follows the project's code of conduct
  • This contribution follows the project's contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@@ -149,7 +149,7 @@ func (c mockCloudWatchClient) GetMetricData(input *cloudwatch.GetMetricDataInput
}

for i := 0; i < 10; i++ {
id := fmt.Sprintf("q{i}")
id := "q{i}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ooops, I think I see what this was originally meant to be, but looks like this was a Python format string instead. Don't think it matters much, but maybe less confusing if it's this instead?

Suggested change
id := "q{i}"
id := fmt.Sprintf("q%d", i)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I deleted this repository by mistake. Please fix it yourself

@testwill testwill closed this by deleting the head repository May 30, 2024
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.

2 participants