Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make xattr.Error implement Unwrap #66

Merged
merged 1 commit into from Jun 15, 2022
Merged

Make xattr.Error implement Unwrap #66

merged 1 commit into from Jun 15, 2022

Conversation

aureliar8
Copy link
Contributor

@aureliar8 aureliar8 commented Jun 14, 2022

This makes xattr.Error implement the Unwrap interface. It allows consumers to inspect the errors more efficiently like:

_, err := xattr.Get("file", "attribute")
if err != nil {
    if errors.Is(err, fs.ErrNotFound) {
        //Do something
    }
}

@aureliar8 aureliar8 changed the title Make *Error implement Unwrap Make xattr.Error implement Unwrap Jun 14, 2022
@kuba--
Copy link
Member

kuba-- commented Jun 15, 2022

Thanks

@kuba-- kuba-- merged commit 5a86313 into pkg:master Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants