diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-09-24 03:06:44 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-09-24 03:06:48 -0700 |
| commit | 5e239afdfc64ef39c5d4f41ec16410e726614eee (patch) | |
| tree | 8f1088f327777603dbdcb1d137ddc26efd18dfa6 /weed/util/bytes.go | |
| parent | c7d7b1a0f6e396e481c184c419e89675435f0e18 (diff) | |
| download | seaweedfs-5e239afdfc64ef39c5d4f41ec16410e726614eee.tar.xz seaweedfs-5e239afdfc64ef39c5d4f41ec16410e726614eee.zip | |
hardlink works now
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)) +} |
