1
0

Added some more comments.

This commit is contained in:
Alexander Andreev 2023-05-22 02:37:37 +04:00
parent 16e5ececf5
commit 8c8c1f2617
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -95,10 +95,13 @@ func initSQLiteStatements(db *sql.DB) error {
return nil return nil
} }
// SQLiteDatabase implements a Guestbook that works with a SQLite DB
// under the hood.
type SQLiteDatabase struct { type SQLiteDatabase struct {
db *sql.DB db *sql.DB
} }
// NewSQLiteDB returns an instance of a SQLite Guestbook implementation.
func NewSQLiteDB(filePath string) (Guestbook, error) { func NewSQLiteDB(filePath string) (Guestbook, error) {
db, err := sql.Open("sqlite3", sqliteDSN(filePath)) db, err := sql.Open("sqlite3", sqliteDSN(filePath))
if err != nil { if err != nil {