aboutsummaryrefslogtreecommitdiff
path: root/unmaintained
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-08 21:39:33 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-08 21:39:33 -0700
commit2e3f6ad3a97bc7fad349e63289695547f92c1f8b (patch)
tree036cbe846cb6387a3a22cc0a19a1d6d770b061e7 /unmaintained
parent5ac6297c685a3bd6c9b8a3d0f2328dde01f7013a (diff)
downloadseaweedfs-2e3f6ad3a97bc7fad349e63289695547f92c1f8b.tar.xz
seaweedfs-2e3f6ad3a97bc7fad349e63289695547f92c1f8b.zip
filer: remember content is gzipped or not
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/repeated_vacuum/repeated_vacuum.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/unmaintained/repeated_vacuum/repeated_vacuum.go b/unmaintained/repeated_vacuum/repeated_vacuum.go
index ebe5d8225..c2f626f72 100644
--- a/unmaintained/repeated_vacuum/repeated_vacuum.go
+++ b/unmaintained/repeated_vacuum/repeated_vacuum.go
@@ -1,7 +1,6 @@
package main
import (
- "bytes"
"flag"
"fmt"
"log"
@@ -31,11 +30,10 @@ func main() {
data := make([]byte, 1024)
rand.Read(data)
- reader := bytes.NewReader(data)
targetUrl := fmt.Sprintf("http://%s/%s", assignResult.Url, assignResult.Fid)
- _, err = operation.Upload(targetUrl, fmt.Sprintf("test%d", i), false, reader, false, "bench/test", nil, assignResult.Auth)
+ _, err = operation.UploadData(targetUrl, fmt.Sprintf("test%d", i), false, data, false, "bench/test", nil, assignResult.Auth)
if err != nil {
log.Fatalf("upload: %v", err)
}