Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Idempotent storager delete operation #20

Merged
merged 2 commits into from
May 7, 2021
Merged

Conversation

JinnyYi
Copy link
Contributor

@JinnyYi JinnyYi commented May 6, 2021

Idempotent storager delete operation in ref: beyondstorage/go-storage#554.

error.go Outdated
// ref: https://cloud.tencent.com/document/product/436/7730
const (
// NoSuchKey the specified key does not exist.
NoSuchKey = "NoSuchKey"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't export SDK errors

storage.go Outdated
@@ -27,6 +27,11 @@ func (s *Storage) delete(ctx context.Context, path string, opt pairStorageDelete

_, err = s.object.Delete(ctx, rp)
if err != nil {
if e, ok := err.(*cos.ErrorResponse); ok {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please extrace a checkError(err error, code string) bool

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants