kanban

Kanban client in Gio
Log | Files | Refs | README | LICENSE

commit e22122e8bff7be53674b36b735695d93378af06a
parent 02418babc3d359494fc86a38cab382d8c238517d
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date:   Sat, 13 Feb 2021 15:41:16 +0800

fix: default to storm storage, and defer close in the proper scope

Diffstat:
Mcmd/kanban/main.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmd/kanban/main.go b/cmd/kanban/main.go @@ -35,7 +35,7 @@ var ( ) func init() { - pflag.BoolVar(&MemStorage, "mem-storage", true, "store entities in memory") + pflag.BoolVar(&MemStorage, "mem-storage", false, "store entities in memory") pflag.Parse() } @@ -59,10 +59,12 @@ func main() { if err != nil { log.Fatalf("error: initializing data: %v", err) } - defer db.Close() return &kanban.StormStorer{DB: db} } }() + if closer, ok := storage.(interface{ Close() error }); ok { + defer closer.Close() + } go func() { ui := UI{ Window: app.NewWindow(app.Title("Kanban")),