fix: close file in the generateAtDir func

This commit is contained in:
guangwu 2024-04-07 13:47:06 +08:00 committed by guangwu
parent 618fe533f8
commit 45229ce1f4

View file

@ -73,6 +73,10 @@ func generateAtDir(cheatsheetDir string) {
content = fmt.Sprintf("_This file is auto-generated. To update, make the changes in the "+
"pkg/i18n directory and then run `%s` from the project root._\n\n%s", CommandToRun(), content)
writeString(file, content)
err = file.Close()
if err != nil {
log.Fatal(err)
}
}
}