mirror of
https://github.com/spf13/cobra
synced 2025-05-06 05:17:21 +00:00
fix: defer licenseFile
This commit is contained in:
parent
891d81cc84
commit
7a0cf95b2a
1 changed files with 1 additions and 0 deletions
|
@ -75,6 +75,7 @@ func (p *Project) createLicenseFile() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer licenseFile.Close()
|
||||
|
||||
licenseTemplate := template.Must(template.New("license").Parse(p.Legal.Text))
|
||||
return licenseTemplate.Execute(licenseFile, data)
|
||||
|
|
Loading…
Add table
Reference in a new issue