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

Include package names in errors #2

Open
kevinburke opened this issue Jan 14, 2018 · 1 comment
Open

Include package names in errors #2

kevinburke opened this issue Jan 14, 2018 · 1 comment

Comments

@kevinburke
Copy link
Owner

We ask the user to give us the package name, we can include it in the returned errors.

We could also add a IsNotExist(err) function for determining whether an error is because a file wasn't present.

@sfllaw
Copy link

sfllaw commented Nov 22, 2019

🤔 Perhaps you could return os.PathError{Err: os.ErrNotExist} as the error, which can be detected with errors.Is(err, os.ErrNotExist)?

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

2 participants