Skip to content

Commit

Permalink
ignore error while closing file in defer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianczech committed Mar 8, 2024
1 parent 82b673b commit d67d35c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/generate/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ func copyAsset(target string, asset *properties.Asset, files []string) error {
return err
}
defer func(destinationFile *os.File) {
err := destinationFile.Close()
if err != nil {

}
_ = destinationFile.Close()
}(destinationFile)

// Write the contents into the destination file
Expand Down

0 comments on commit d67d35c

Please sign in to comment.