cli/command/container: don't use naked returns (nakedret)
cli/command/container/cp.go:206:3: naked return in func `resolveLocalPath` with 5 lines of code (nakedret) return ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e569b9f74a
commit
a5020ea165
@ -201,9 +201,10 @@ func runCopy(ctx context.Context, dockerCli command.Cli, opts copyOptions) error
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func resolveLocalPath(localPath string) (absPath string, err error) {
|
func resolveLocalPath(localPath string) (absPath string, _ error) {
|
||||||
if absPath, err = filepath.Abs(localPath); err != nil {
|
absPath, err := filepath.Abs(localPath)
|
||||||
return
|
if err != nil {
|
||||||
|
return "", err
|
||||||
}
|
}
|
||||||
return archive.PreserveTrailingDotOrSeparator(absPath, localPath), nil
|
return archive.PreserveTrailingDotOrSeparator(absPath, localPath), nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user