From 7901eb8eb458208b07d6ca6d9dfddff6821cabe9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 10 Oct 2020 16:29:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Compact=20DB=20on=20close?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/store.go b/store.go index b0bbac1..5004104 100644 --- a/store.go +++ b/store.go @@ -118,6 +118,9 @@ func NewDBStore(filename string) (*DBStore, error) { } func (store *DBStore) Close() error { + if err := store.db.Shrink(); err != nil { + return err + } return store.db.Close() }