diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-02-02 11:41:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 11:41:10 +0100 |
commit | 2754ecf502e84e1b4d9fe479d1f68ab1d6194882 (patch) | |
tree | 926d198440a1349336e37532d1bbc49a98a217a1 | |
parent | dff8e9cdcd7cfb804bf0d6c8ef81bfcd106c6e61 (diff) | |
parent | 6fe5af18184695a0bde2d39050a83e8740f9a845 (diff) |
Merge pull request #25847 from vespa-engine/arnej/avoid-using-copy-as-function-namev8.120.11
avoid hiding built-in function "copy"
-rw-r--r-- | client/go/cmd/clone.go | 4 |
1 files 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 |