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

Expose Errors as public #9

Open
jerome-laforge opened this issue Jan 15, 2021 · 1 comment
Open

Expose Errors as public #9

jerome-laforge opened this issue Jan 15, 2021 · 1 comment

Comments

@jerome-laforge
Copy link

I need to do some check according error returns Apply.
Unfortunately errors are private.
Is It possible to expose them as public errors?

That replace this:

if err.Error() == "key not found" {
   // manage key not found
}

by

if errors.Is(err, scanner.ErrKeyNotFound) {
    // manage key not found
}

I can make PR, if it is ok for you.

Thanks

@jerome-laforge
Copy link
Author

Hello @savaki
any news about this issue?

Thanks for your support

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

No branches or pull requests

1 participant