prometheus / procfs

procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
Apache License 2.0
756 stars 311 forks source link

Use Go 1.20+ Error Wrapping #519

Closed conallob closed 3 months ago

conallob commented 1 year ago

Follow on from https://github.com/prometheus/procfs/issues/358

https://go.dev/doc/go1.20#errors introduces the ability to wrap multiple errors using multiple %w atoms in fmt.Errorf()

Once Go v1.20 is the default version, fmt.Errorf() entries should be updated to use multiple %w atoms. Thanks to https://github.com/prometheus/procfs/issues/358 , this should be replacing %s for %w