MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / Delete

Method Delete

driver/oss/s3.go:91–102  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

89// Deleting a non-existing key-value pair does NOT lead to an error.
90// The key must not be "".
91func (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.

Callers 1

S3DeleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected