mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
add comments, code refactor, fix typo
This commit is contained in:
@@ -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)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user