1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

优化range引用

This commit is contained in:
2022-07-04 12:01:44 +08:00
parent 44304f5b16
commit 886723997e
8 changed files with 143 additions and 12 deletions

View File

@ -42,7 +42,8 @@ func (z *zipPackage) Write(out *os.File) error {
zipWriter := zip.NewWriter(out)
defer zipWriter.Close()
for _, f := range z.files {
files := z.files
for _, f := range files {
fileWriter, err := zipWriter.Create(f.name)
if err != nil {
return err