diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-26 11:23:46 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-03-29 11:06:03 -0400 |
commit | e7dc66d832d44eac11cb341f09844850e3e0224d (patch) | |
tree | e836a3d9a5ff60c9019e3daf2601d3c922af2a38 /vendor/github.com/prometheus/procfs/loadavg.go | |
parent | 57e0d8f2930690de69c690c41e30abaa2cdb3776 (diff) | |
download | podman-e7dc66d832d44eac11cb341f09844850e3e0224d.tar.gz podman-e7dc66d832d44eac11cb341f09844850e3e0224d.tar.bz2 podman-e7dc66d832d44eac11cb341f09844850e3e0224d.zip |
[NO TESTS NEEDED] Vendor in containers/buildah v1.20.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
<MH: Fixed cherry-pick conflicts. Re-ran vendor.>
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/github.com/prometheus/procfs/loadavg.go')
-rw-r--r-- | vendor/github.com/prometheus/procfs/loadavg.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/prometheus/procfs/loadavg.go b/vendor/github.com/prometheus/procfs/loadavg.go index 00bbe1441..0cce190ec 100644 --- a/vendor/github.com/prometheus/procfs/loadavg.go +++ b/vendor/github.com/prometheus/procfs/loadavg.go @@ -44,14 +44,14 @@ func parseLoad(loadavgBytes []byte) (*LoadAvg, error) { loads := make([]float64, 3) parts := strings.Fields(string(loadavgBytes)) if len(parts) < 3 { - return nil, fmt.Errorf("malformed loadavg line: too few fields in loadavg string: %s", string(loadavgBytes)) + return nil, fmt.Errorf("malformed loadavg line: too few fields in loadavg string: %q", string(loadavgBytes)) } var err error for i, load := range parts[0:3] { loads[i], err = strconv.ParseFloat(load, 64) if err != nil { - return nil, fmt.Errorf("could not parse load '%s': %s", load, err) + return nil, fmt.Errorf("could not parse load %q: %w", load, err) } } return &LoadAvg{ |