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 all occurrences of fmt.Sprint(x) where x is int #7244

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Jan 4, 2021

Description

What it says in the title. Also reorder some imports to follow the "stdlib/3rdparty+vitess/proto" pattern.

Related Issue(s)

Checklist

  • Should this PR be backported? No
  • Tests were added or are not required N/A
  • Documentation was added or is not required N/A

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build

Also reorder some imports to follow the "stdlib/3rdparty+vitess/proto"
pattern

Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 requested a review from sougou as a code owner January 4, 2021 16:00
@ajm188
Copy link
Contributor Author

ajm188 commented Jan 4, 2021

@shlomi-noach I believe this also fixes some of the goimports issues you were discussing in #7235

Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

lgtm; personal preference to keep printf behavior, and change to fmt.Sprintf("%d", <the-value>) instead of strconv.FormatInt(<the-value>, 10) but it's fine as it is.

@deepthi deepthi merged commit 2ec07fa into vitessio:master Jan 5, 2021
@ajm188
Copy link
Contributor Author

ajm188 commented Jan 6, 2021

fwiw fmt.Sprintf and fmt.Sprint have the same performance characteristics, which was the original motivation for this change.

@ajm188 ajm188 deleted the am_faster_int_prints branch January 6, 2021 00:54
@shlomi-noach
Copy link
Contributor

have the same performance characteristics, which was the original motivation for this change

I see. I thought this was about a linter issue.

@askdba askdba added this to the v9.0 milestone Jan 6, 2021
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.

5 participants