diff options
Diffstat (limited to 'pkg/specgenutil/util.go')
-rw-r--r-- | pkg/specgenutil/util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgenutil/util.go b/pkg/specgenutil/util.go index 66d148672..b14e2a032 100644 --- a/pkg/specgenutil/util.go +++ b/pkg/specgenutil/util.go @@ -20,7 +20,7 @@ import ( func ReadPodIDFile(path string) (string, error) { content, err := ioutil.ReadFile(path) if err != nil { - return "", fmt.Errorf("error reading pod ID file: %w", err) + return "", fmt.Errorf("reading pod ID file: %w", err) } return strings.Split(string(content), "\n")[0], nil } @@ -165,7 +165,7 @@ func parseSplitPort(hostIP, hostPort *string, ctrPort string, protocol *string) } ctrStart, ctrLen, err := parseAndValidateRange(ctrPort) if err != nil { - return newPort, fmt.Errorf("error parsing container port: %w", err) + return newPort, fmt.Errorf("parsing container port: %w", err) } newPort.ContainerPort = ctrStart newPort.Range = ctrLen @@ -197,7 +197,7 @@ func parseSplitPort(hostIP, hostPort *string, ctrPort string, protocol *string) } else { hostStart, hostLen, err := parseAndValidateRange(*hostPort) if err != nil { - return newPort, fmt.Errorf("error parsing host port: %w", err) + return newPort, fmt.Errorf("parsing host port: %w", err) } if hostLen != ctrLen { return newPort, fmt.Errorf("host and container port ranges have different lengths: %d vs %d", hostLen, ctrLen) |