Return Guestbook interface instead of SQLiteDatabase instance.
This commit is contained in:
parent
f602dddff3
commit
bea8df31cb
@ -100,7 +100,7 @@ type SQLiteDatabase struct {
|
|||||||
db *sql.DB
|
db *sql.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(filePath string) (*SQLiteDatabase, error) {
|
func New(filePath string) (guestbook.Guestbook, error) {
|
||||||
db, err := sql.Open("sqlite3", dsn(filePath))
|
db, err := sql.Open("sqlite3", dsn(filePath))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user