示例#1
0
func init() {
	var err error
	testDB, err = imdb.Open(testDriver, testDsn)
	if err != nil {
		log.Fatal(err)
	}
}
示例#2
0
func openDb(driver, dsn string) *imdb.DB {
	db, err := imdb.Open(driver, dsn)
	if err != nil {
		fatalf("Could not open %s database: %s", driver, err)
	}
	return db
}