add comments, code refactor, fix typo

This commit is contained in:
MaysWind
2020-12-23 00:09:35 +08:00
parent bb10498893
commit 17d1cd8719
10 changed files with 49 additions and 13 deletions
+1
View File
@@ -5,6 +5,7 @@ import (
"math/big"
)
// GetRandomInteger returns a random number, the max parameter represents upper limit
func GetRandomInteger(max int) (int, error) {
result, err := rand.Int(rand.Reader, big.NewInt(int64(max)))