Skip to content

Commit

Permalink
fix: close contentFile
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
  • Loading branch information
testwill committed Apr 9, 2024
1 parent 8c17dda commit b9e2351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fyne/internal/commands/package-mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (p *Packager) packageIOS(target string, tags []string) error {

iconDir := util.EnsureSubDir(assetDir, "AppIcon.appiconset")
contentFile, _ := os.Create(filepath.Join(iconDir, "Contents.json"))

defer contentFile.Close()
err = templates.XCAssetsDarwin.Execute(contentFile, nil)
if err != nil {
return fmt.Errorf("failed to write xcassets content template: %w", err)
Expand Down

0 comments on commit b9e2351

Please sign in to comment.