aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_s3_clean_uploads.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-03-14 13:21:02 -0700
committerChris Lu <chris.lu@gmail.com>2021-03-14 13:21:02 -0700
commit35d939a1d21322e7eb1d58899ebf4929f4fd2a72 (patch)
tree81bdbb840c0b0726910979f43602b0d314f640a7 /weed/shell/command_s3_clean_uploads.go
parent2d4c2db81df0b5012705c395aa306cd077cc36f4 (diff)
downloadseaweedfs-35d939a1d21322e7eb1d58899ebf4929f4fd2a72.tar.xz
seaweedfs-35d939a1d21322e7eb1d58899ebf4929f4fd2a72.zip
go fmt
Diffstat (limited to 'weed/shell/command_s3_clean_uploads.go')
-rw-r--r--weed/shell/command_s3_clean_uploads.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/shell/command_s3_clean_uploads.go b/weed/shell/command_s3_clean_uploads.go
index 1fe13d981..5f674d7b6 100644
--- a/weed/shell/command_s3_clean_uploads.go
+++ b/weed/shell/command_s3_clean_uploads.go
@@ -54,7 +54,7 @@ func (c *commandS3CleanUploads) Do(args []string, commandEnv *CommandEnv, writer
return fmt.Errorf("list buckets under %v: %v", filerBucketsPath, err)
}
- for _, bucket:= range buckets {
+ for _, bucket := range buckets {
c.cleanupUploads(commandEnv, writer, filerBucketsPath, bucket, *uploadedTimeAgo)
}
@@ -63,7 +63,7 @@ func (c *commandS3CleanUploads) Do(args []string, commandEnv *CommandEnv, writer
}
func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io.Writer, filerBucketsPath string, bucket string, timeAgo time.Duration) error {
- uploadsDir := filerBucketsPath+"/"+bucket+"/.uploads"
+ uploadsDir := filerBucketsPath + "/" + bucket + "/.uploads"
var staleUploads []string
now := time.Now()
err := filer_pb.List(commandEnv, uploadsDir, "", func(entry *filer_pb.Entry, isLast bool) error {
@@ -77,8 +77,8 @@ func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io
return fmt.Errorf("list uploads under %v: %v", uploadsDir, err)
}
- for _, staleUpload:= range staleUploads {
- deleteUrl := fmt.Sprintf("http://%s:%d%s/%s?recursive=true&ignoreRecursiveError=true",commandEnv.option.FilerHost, commandEnv.option.FilerPort,uploadsDir, staleUpload)
+ for _, staleUpload := range staleUploads {
+ deleteUrl := fmt.Sprintf("http://%s:%d%s/%s?recursive=true&ignoreRecursiveError=true", commandEnv.option.FilerHost, commandEnv.option.FilerPort, uploadsDir, staleUpload)
fmt.Fprintf(writer, "purge %s\n", deleteUrl)
err = util.Delete(deleteUrl, "")
@@ -89,4 +89,4 @@ func (c *commandS3CleanUploads) cleanupUploads(commandEnv *CommandEnv, writer io
return nil
-} \ No newline at end of file
+}