package store import ( "database/sql" _ "github.com/mattn/go-sqlite3" ) // file points the the sqlite file. const file = "./govote.db" // db references the initialized sqlite connection. var db *sql.DB // init initialized the database layer func init() { var err error if db, err = sql.Open("sqlite3", file); err != nil { panic(err) } // initialize the sql schema initCreateTables(db) // initialize all prepared statements initStmts(db) }