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

wgctrl: replace "not found" sentinels with errors.Is check #73

Closed
mdlayher opened this issue Oct 16, 2019 · 3 comments
Closed

wgctrl: replace "not found" sentinels with errors.Is check #73

mdlayher opened this issue Oct 16, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@mdlayher
Copy link
Member

In Go 1.13, we can use errors.Is(err, os.ErrNotExist) and similar to look for certain classes of errors. The code in this package should comply with that pattern, while also attempting to retain some compatibility with older versions of Go.

@mdlayher mdlayher added the enhancement New feature or request label Oct 16, 2019
@muhlemmer
Copy link
Contributor

If you would be OK with importing an additional package. https://github.com/friendsofgo/errors implements the same Go 1.13+ interface, while being able to use an older version of Go. If later it is decided to drop support for older Go versions, one can just change the import path to the standard error package. I've seen and done this in other projects already.

If you need help, I can volunteer.

@mdlayher
Copy link
Member Author

Thanks for reaching out; at this point I'd rather just hold off and drop support for Go 1.12 and below in the next few months. Folks who are running WireGuard are generally more willing to run up to date software since it isn't packaged in any kernels yet.

@mdlayher
Copy link
Member Author

mdlayher commented May 4, 2021

This is done.

@mdlayher mdlayher closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants