You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
255 B

  1. package operation
  2. import (
  3. "log"
  4. "net/http"
  5. )
  6. func Delete(url string) error {
  7. req, err := http.NewRequest("DELETE", url, nil)
  8. if err != nil {
  9. log.Println("failing to delete", url)
  10. return err
  11. }
  12. _, err = http.DefaultClient.Do(req)
  13. return err
  14. }