town/invites/invites.go

18 lines
260 B
Go
Raw Normal View History

2023-02-24 20:58:38 +00:00
package invites
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
)
2023-02-24 20:58:38 +00:00
const dsn = "/town/var/invites/invites.db?mode=rw"
func ConnectDB() (*sql.DB, error) {
db, err := sql.Open("sqlite3", dsn)
if err != nil {
return nil, err
}
return db, nil
}