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

Improve randomString function #428

Merged
merged 1 commit into from
Feb 14, 2020
Merged

Improve randomString function #428

merged 1 commit into from
Feb 14, 2020

Conversation

vertextau
Copy link
Contributor

Hi!
I noticed that you use Sprintf to return a hex string. But it is slower because it has to parse the format string first. This patch brings EncodeToString from encoding/hex package to improve randomString function.

Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

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

neat, thanks!

@vilmibm vilmibm merged commit 10ea161 into cli:master Feb 14, 2020
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