mirror of
https://github.com/skanehira/tson
synced 2024-11-15 12:13:04 +00:00
close file
This commit is contained in:
parent
706bb85b5c
commit
18ed987be1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user