aboutsummaryrefslogtreecommitdiff
path: root/weed/util/bytes.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-24 03:06:44 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-24 03:06:48 -0700
commit5e239afdfc64ef39c5d4f41ec16410e726614eee (patch)
tree8f1088f327777603dbdcb1d137ddc26efd18dfa6 /weed/util/bytes.go
parentc7d7b1a0f6e396e481c184c419e89675435f0e18 (diff)
downloadseaweedfs-5e239afdfc64ef39c5d4f41ec16410e726614eee.tar.xz
seaweedfs-5e239afdfc64ef39c5d4f41ec16410e726614eee.zip
hardlink works now
Diffstat (limited to 'weed/util/bytes.go')
-rw-r--r--weed/util/bytes.go6
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))
+}