Added some more comments.
This commit is contained in:
parent
16e5ececf5
commit
8c8c1f2617
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user