From 5f93bd450cf811ad9531166e541616bc1095247a Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 6 Jan 2022 18:50:02 -0500 Subject: [PATCH] check db close error --- docs/tutorials/go-built-in.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/go-built-in.md b/docs/tutorials/go-built-in.md index edfd1aa7a..8dacfb3cb 100644 --- a/docs/tutorials/go-built-in.md +++ b/docs/tutorials/go-built-in.md @@ -482,9 +482,11 @@ Next, we create a database handle and use it to construct our ABCI application: if err != nil { panic(err) } - defer db.Close() app := NewKVStoreApplication(db) acc := abciclient.NewLocalCreator(app) + if err := db.Close(); err != nil { + log.Fatalf("Opening closing: %v", err) + } ... ```