2
0
mirror of https://github.com/skanehira/tson synced 2024-11-15 12:13:04 +00:00

close file

This commit is contained in:
skanehira 2019-11-09 10:46:41 +09:00
parent 706bb85b5c
commit 18ed987be1

View File

@ -150,6 +150,7 @@ func (g *Gui) LoadJSON() {
log.Println(fmt.Sprintf("can't open file: %s", err))
return err
}
defer file.Close()
i, err := UnMarshalJSON(file)
if err != nil {
@ -419,6 +420,7 @@ func (g *Gui) EditWithEditor() {
g.Message(err.Error(), "main", func() {})
return
}
defer f.Close()
i, err := UnMarshalJSON(f)
if err != nil {