You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a good point. Delete should probably not return fs.ErrNotExist if the key does not exist, but probably should if a prefix of the key does not exist. For example:
Delete("a/b/c") when c does not exist inside a/b => No error, since that leaf is effectively deleted.
Delete("a/b/c") when a/b does not exist => Probably an error?
I dunno. What do you think, should it return an error in that second case?
I'd be fine with either, though semantically your proposed error essentially boils down to "something I expected to exist doesn't, so inform the caller". So maybe it should return an error in both cases? idk it's not quite the same thing.
In terms of my implementation, what would you guess would be the best behavior to have for now to maximize compatibility with the current release of certmagic?
What is your question?
Under what conditions should Delete return an error? This and this seem to contradict each other.
The text was updated successfully, but these errors were encountered: