File tree 2 files changed +9
-10
lines changed 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -451,15 +451,14 @@ func Unzip(srcPath, destPath string) error {
451
451
}
452
452
453
453
// Write data to file
454
- fw , err := os .Create (filepath .Join (destPath , f .Name ))
454
+ var fw * os.File
455
+ fw , err = os .Create (filepath .Join (destPath , f .Name ))
455
456
if err != nil {
456
457
return err
457
458
}
458
459
_ , err = io .Copy (fw , rc )
459
-
460
- if fw != nil {
461
- fw .Close ()
462
- }
460
+ fw .Close ()
461
+ rc .Close ()
463
462
if err != nil {
464
463
return err
465
464
}
Original file line number Diff line number Diff line change @@ -7,21 +7,21 @@ require (
7
7
github.com/admpub/fsnotify v1.7.0
8
8
github.com/admpub/pp v0.0.7
9
9
github.com/francoispqt/gojay v1.2.13
10
- github.com/goccy/go-json v0.10.4
10
+ github.com/goccy/go-json v0.10.5
11
11
github.com/hashicorp/go-version v1.7.0
12
12
github.com/json-iterator/go v1.1.12
13
13
github.com/stretchr/testify v1.9.0
14
- golang.org/x/crypto v0.31 .0
15
- golang.org/x/text v0.21 .0
14
+ golang.org/x/crypto v0.33 .0
15
+ golang.org/x/text v0.22 .0
16
16
)
17
17
18
18
require (
19
19
github.com/davecgh/go-spew v1.1.1 // indirect
20
- github.com/mattn/go-colorable v0.1.13 // indirect
20
+ github.com/mattn/go-colorable v0.1.14 // indirect
21
21
github.com/mattn/go-isatty v0.0.20 // indirect
22
22
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
23
23
github.com/modern-go/reflect2 v1.0.2 // indirect
24
24
github.com/pmezard/go-difflib v1.0.0 // indirect
25
- golang.org/x/sys v0.28 .0 // indirect
25
+ golang.org/x/sys v0.30 .0 // indirect
26
26
gopkg.in/yaml.v3 v3.0.1 // indirect
27
27
)
You can’t perform that action at this time.
0 commit comments