pkg/archive/copy.go
Function CopyInfoDestinationPath
has 8 return statements (exceeds 4 allowed). Open
Open
func CopyInfoDestinationPath(path string) (info CopyInfo, err error) {
maxSymlinkIter := 10 // filepath.EvalSymlinks uses 255, but 10 already seems like a lot.
path = normalizePath(path)
originalPath := path
Function RebaseArchiveEntries
has 5 return statements (exceeds 4 allowed). Open
Open
func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.ReadCloser {
if oldBase == string(os.PathSeparator) {
// If oldBase specifies the root directory, use an empty string as
// oldBase instead so that newBase doesn't replace the path separator
// that all paths will start with.