From fdf4e90e8978a03d7989194bab4968ff6d532ae4 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 8 Jun 2021 12:55:38 -0700 Subject: [PATCH] libct/cg/fscommon.ParseKeyValue: no need to wrap err The error returned from strconv.ParseUint is already pretty descriptive, something like: strconv.ParseUint: parsing "000d": invalid syntax So, there is no need to add more context to it. Signed-off-by: Kir Kolyshkin --- libcontainer/cgroups/fscommon/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/cgroups/fscommon/utils.go b/libcontainer/cgroups/fscommon/utils.go index 0d184bce4..1c5d8109f 100644 --- a/libcontainer/cgroups/fscommon/utils.go +++ b/libcontainer/cgroups/fscommon/utils.go @@ -53,7 +53,7 @@ func ParseKeyValue(t string) (string, uint64, error) { value, err := ParseUint(parts[1], 10, 64) if err != nil { - return "", 0, fmt.Errorf("unable to convert to uint64: %v", err) + return "", 0, err } return parts[0], value, nil