Beispiel #1
0
func (c *Cache) Delete(key string) {
	rdr, err := s3util.Delete(c.url(key), &c.Config)
	if err != nil {
		log.Printf("s3cache.Delete failed: %s", err)
		return
	}
	defer rdr.Close()
}
Beispiel #2
0
func (fs *S3FS) Remove(name string) (err error) {
	var rdr io.ReadCloser
	rdr, err = s3util.Delete(fs.url(name), fs.config)
	defer func() {
		if rdr != nil {
			err2 := rdr.Close()
			if err == nil {
				err = err2
			}
		}
	}()
	return err
}