seaweedfs/go/operation/delete_content.go

17 lines
255 B
Go
Raw Normal View History

2012-09-26 10:27:10 +00:00
package operation
import (
"log"
2013-01-17 08:56:56 +00:00
"net/http"
2012-09-26 10:27:10 +00:00
)
func Delete(url string) error {
req, err := http.NewRequest("DELETE", url, nil)
if err != nil {
2012-09-26 20:38:45 +00:00
log.Println("failing to delete", url)
2012-09-26 10:27:10 +00:00
return err
}
_, err = http.DefaultClient.Do(req)
return err
}