From 6fe5af18184695a0bde2d39050a83e8740f9a845 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Thu, 2 Feb 2023 10:10:33 +0000 Subject: avoid hiding built-in function "copy" --- client/go/cmd/clone.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/go/cmd/clone.go b/client/go/cmd/clone.go index 7de91cbe104..6fb97581ea3 100644 --- a/client/go/cmd/clone.go +++ b/client/go/cmd/clone.go @@ -102,7 +102,7 @@ func (c *cloner) Clone(applicationName, path string) error { } found = true - if err := copy(f, path, dirPrefix); err != nil { + if err := copyFromZip(f, path, dirPrefix); err != nil { return fmt.Errorf("could not copy zip entry '%s': %w", color.CyanString(f.Name), err) } } @@ -259,7 +259,7 @@ func trimEntityTagID(s string) string { return strings.TrimSuffix(strings.TrimPrefix(s, `W/"`), `"`) } -func copy(f *zip.File, destinationDir string, zipEntryPrefix string) error { +func copyFromZip(f *zip.File, destinationDir string, zipEntryPrefix string) error { destinationPath := filepath.Join(destinationDir, filepath.FromSlash(strings.TrimPrefix(f.Name, zipEntryPrefix))) if strings.HasSuffix(f.Name, "/") { if f.Name != zipEntryPrefix { // root is already created -- cgit v1.2.3