procfs
procfs copied to clipboard
Use Go 1.13 error handling verb
When using fmt.Errorf()
, we should use the new %w
error verb so that error messages can be unwrapped.
This would make the minimum Go version be 1.13, so we should make sure client_golang is OK with this.
cc @beorn7 about the client_golang interaction.
There is no fixed policy, but unless it's prohibitively cumbersome, I'd like to support three to four past Go versions, which is currently back to Go 1.12 or 1.11.
Could we use a build tag to keep supporting older build versions for a while?
We could, but there's no rush to do this change. It's just a nice to have to allow more verbose library errors, while still being able to parse "no such file or directory" errors.
Is this not a dupe of https://github.com/prometheus/procfs/issues/358 ? If so, it has been partially implemented, with https://github.com/prometheus/procfs/issues/519 waiting for a major release in order to change the minimum Go version.
Yea, this can be closed.