diff options
Diffstat (limited to 'pkg/specgenutil')
-rw-r--r-- | pkg/specgenutil/specgen.go | 2 | ||||
-rw-r--r-- | pkg/specgenutil/util.go | 6 | ||||
-rw-r--r-- | pkg/specgenutil/volumes.go | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 3189926b2..2695d8873 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -762,7 +762,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions } retries, err := strconv.Atoi(splitRestart[1]) if err != nil { - return fmt.Errorf("error parsing restart policy retry count: %w", err) + return fmt.Errorf("parsing restart policy retry count: %w", err) } if retries < 0 { return errors.New("must specify restart policy retry count as a number greater than 0") 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) diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go index e9fffdca9..e6c5d8b97 100644 --- a/pkg/specgenutil/volumes.go +++ b/pkg/specgenutil/volumes.go @@ -125,7 +125,7 @@ func parseVolumes(volumeFlag, mountFlag, tmpfsFlag []string, addReadOnlyTmpfs bo if mount.Type == define.TypeBind { absSrc, err := specgen.ConvertWinMountPath(mount.Source) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("error getting absolute path of %s: %w", mount.Source, err) + return nil, nil, nil, nil, fmt.Errorf("getting absolute path of %s: %w", mount.Source, err) } mount.Source = absSrc } |