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

common: fix random number generator #13

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Vicente-Cheng
Copy link
Contributor

This is the side-effect from 97beeb7f7e1f1de4f0ca23be0d1c25a5a8f49097,
the `Sign()` only return sign or not.
Use `Int64()` will make it work as usual.

Copy link
Contributor

@chrisho chrisho left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

LGTM

@Vicente-Cheng
Copy link
Contributor Author

Hi all,
We use the random number generator on harvester-installer, node-manager and node-disk-manager.
So I prefer to wrap this into a common function and add a unit test.
This is the wrapper PR harvester/go-common#5

Change this to draft, I will use this common function after the above PR is merged.

@Vicente-Cheng Vicente-Cheng marked this pull request as draft July 14, 2023 10:46
    This is the side-effect from 97beeb7,
    the `Sign()` only return sign or not.

    Use the warpper function `GenRandNumber` from go-common

Signed-off-by: Vicente Cheng <[email protected]>
@Vicente-Cheng Vicente-Cheng marked this pull request as ready for review July 18, 2023 02:15
@Vicente-Cheng
Copy link
Contributor Author

Hi all, update to using the wrapper function from go-common.
Please help to review it again.

@Vicente-Cheng Vicente-Cheng requested review from bk201 and chrisho July 18, 2023 02:18
Copy link

@guangbochen guangbochen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@Vicente-Cheng Vicente-Cheng merged commit 627f966 into harvester:master Jul 18, 2023
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.

4 participants