// ConnectSQLite - Binds Storage with SQLite DB
Binds Storage with SQLite DB
// ConnectSQLite - Binds Storage with SQLite DB
func ConnectSQLite(conf ConfSQLiteDataBase) (*Storage, error) {
	dsn := fmt.Sprintf("file:%s?cache=shared&mode=memory", conf.Path)
	db, err := sql.Open("sqlite3", dsn)
	if err != nil {
		return nil, fmt.Errorf("can't connect to SQLite: %s", err)
	}
	return &Storage{
		Type: "sqlite",
		DB:   db,
	}, nil
}
func ConnectSQLite ( conf ConfSQLiteDataBase ) ( * Storage , error ) { dsn := fmt . Sprintf ( " " , conf . Path ) db , err := sql . Open ( " " , dsn ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & Storage { Type : " " , DB : db , } , nil }
Binds Storage with SQLite DB
Binds Storage with SQLite DB