diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-09-24 11:11:42 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-09-24 11:11:42 -0700 |
| commit | 1012df7bb55341fb7d835269cf9bb7edc6507d25 (patch) | |
| tree | 4ec73d9833a48dd1210e99e19bc935454d9815ee /weed/util/bytes.go | |
| parent | 4856bce0ee929088c64e311b4ac554e872fba12e (diff) | |
| download | seaweedfs-1012df7bb55341fb7d835269cf9bb7edc6507d25.tar.xz seaweedfs-1012df7bb55341fb7d835269cf9bb7edc6507d25.zip | |
switch hardlink id from int64 to bytes
Diffstat (limited to 'weed/util/bytes.go')
| -rw-r--r-- | weed/util/bytes.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/util/bytes.go b/weed/util/bytes.go index a7e0c20e2..67e6876fa 100644 --- a/weed/util/bytes.go +++ b/weed/util/bytes.go @@ -143,8 +143,8 @@ func RandomInt32() int32 { return int32(BytesToUint32(buf)) } -func RandomInt64() int64 { - buf := make([]byte, 8) +func RandomBytes(byteCount int) []byte { + buf := make([]byte, byteCount) rand.Read(buf) - return int64(BytesToUint64(buf)) + return buf } |
