diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-03-20 13:30:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-03-20 13:30:34 -0700 |
| commit | 7251e357e70888539f3e3b3922004356d2d605da (patch) | |
| tree | 6b10042b96377f50c50aaa0a0e5f44cc9fa05de4 /go/operation/delete_content.go | |
| parent | 7c5c94785c5789a333987348c3a3e462c143e885 (diff) | |
| download | seaweedfs-7251e357e70888539f3e3b3922004356d2d605da.tar.xz seaweedfs-7251e357e70888539f3e3b3922004356d2d605da.zip | |
enhance deletion operation
Diffstat (limited to 'go/operation/delete_content.go')
| -rw-r--r-- | go/operation/delete_content.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/go/operation/delete_content.go b/go/operation/delete_content.go index 1c7b1f9a8..edd0f0716 100644 --- a/go/operation/delete_content.go +++ b/go/operation/delete_content.go @@ -1,8 +1,7 @@ package operation import ( - "code.google.com/p/weed-fs/go/glog" - "net/http" + "code.google.com/p/weed-fs/go/util" ) func DeleteFile(server string, fileId string) error { @@ -10,14 +9,5 @@ func DeleteFile(server string, fileId string) error { if err != nil { return err } - return Delete(fileUrl) -} -func Delete(url string) error { - req, err := http.NewRequest("DELETE", url, nil) - if err != nil { - glog.V(0).Infoln("failing to delete", url) - return err - } - _, err = client.Do(req) - return err + return util.Delete(fileUrl) } |
