func Open(url string) (Driver, error) {
	u, err := nurl.Parse(url)
	if err != nil {
		return nil, err
	}
	if u.Scheme == "" {
		return nil, fmt.Errorf("database driver: invalid URL scheme")
	}
	driversMu.RLock()
	d, ok := drivers[u.Scheme]
	driversMu.RUnlock()
	if !ok {
		return nil, fmt.Errorf("database driver: unknown driver %v (forgotton import?)", u.Scheme)
	}
	return d.Open(url)
}
Open returns a new driver instance.
package database
import (
	"fmt"
	"io"
	nurl "net/url"
	"sync"
)
var (
	ErrLocked = fmt.Errorf("can't acquire lock")
)
const NilVersion int = -1
var driversMu sync.RWMutex
var drivers = make(map[string]Driver)
type Driver interface {
	Open(url string) (Driver, error)
	Close() error
	Lock() error
	Unlock() error
	Run(migration io.Reader) error
	SetVersion(version int, dirty bool) error
	Version() (version int, dirty bool, err error)
	Drop() error
}