Delete deletes the stored value for the given key. Deleting a non-existing key-value pair does NOT lead to an error. The key must not be "".
(k string)
| 89 | // Deleting a non-existing key-value pair does NOT lead to an error. |
| 90 | // The key must not be "". |
| 91 | func (c Client) Delete(k string) error { |
| 92 | if err := util.CheckKey(k); err != nil { |
| 93 | return err |
| 94 | } |
| 95 | |
| 96 | deleteObjectInput := awss3.DeleteObjectInput{ |
| 97 | Bucket: &c.bucketName, |
| 98 | Key: &k, |
| 99 | } |
| 100 | _, err := c.c.DeleteObject(&deleteObjectInput) |
| 101 | return err |
| 102 | } |
| 103 | |
| 104 | // Close closes the client. |
| 105 | // In the S3 implementation this doesn't have any effect. |