mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: delay defer templateFile.Close()
This commit is contained in:
parent
fb92747129
commit
d93348842a
@ -62,10 +62,10 @@ func loadTemplates() {
|
||||
}
|
||||
|
||||
templateFile, err := pkger.Open(fmt.Sprintf("%s/%s", tplPath, tplName))
|
||||
defer templateFile.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer templateFile.Close()
|
||||
template, err := ioutil.ReadAll(templateFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user