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 {