From 8c8c1f261793746ca43207a3f21ddfcbbab3e2e9 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 22 May 2023 02:37:37 +0400 Subject: [PATCH] Added some more comments. --- db_sqlite.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db_sqlite.go b/db_sqlite.go index 7db15b4..2adae62 100644 --- a/db_sqlite.go +++ b/db_sqlite.go @@ -95,10 +95,13 @@ func initSQLiteStatements(db *sql.DB) error { return nil } +// SQLiteDatabase implements a Guestbook that works with a SQLite DB +// under the hood. type SQLiteDatabase struct { db *sql.DB } +// NewSQLiteDB returns an instance of a SQLite Guestbook implementation. func NewSQLiteDB(filePath string) (Guestbook, error) { db, err := sql.Open("sqlite3", sqliteDSN(filePath)) if err != nil {