diff options
Diffstat (limited to 'weed/util/bytes.go')
| -rw-r--r-- | weed/util/bytes.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/util/bytes.go b/weed/util/bytes.go index 82e4ddeef..a7e0c20e2 100644 --- a/weed/util/bytes.go +++ b/weed/util/bytes.go @@ -142,3 +142,9 @@ func RandomInt32() int32 { rand.Read(buf) return int32(BytesToUint32(buf)) } + +func RandomInt64() int64 { + buf := make([]byte, 8) + rand.Read(buf) + return int64(BytesToUint64(buf)) +} |
