-
Notifications
You must be signed in to change notification settings - Fork 323
Conversation
Requires activating drivers with a _ style import, e.g. import "_ github.com/mattes/migrate/driver/postgres"
…load-all-drivers-43
Final step before merging, in .travis.yml:
While we're using only |
There's no "tip" golang image, I have removed it, please let me know if this is a blocking issue. |
blankDriver := reflect.New(reflect.TypeOf(driver)).Interface() | ||
d, ok := blankDriver.(Driver) | ||
if !ok { | ||
err := errors.New(fmt.Sprintf("Driver '%s' does not implement the Driver interface")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
err := fmt.Errorf("Driver '%s' does not implement the Driver interface", u.Scheme)
(missing interpolation variable)
btw, refs #43 |
We can't test driver.New methods because of circular imports. That's probably why the initial code had a map[string]interface{} as registry: it removes a dependency import. I prefer the remove the registry and have a registry returning a real Driver. It will ease the development later.
Tests are failing with go 1.3 because of goql (cassandra driver): https://github.com/gocql/gocql/blob/master/control.go#L13
This is not related to this PR. I suggest to drop go 1.3 support. |
I'm fine with dropping 1.3. |
Merged! Awesome work! Thanks @gravis |
Changes Unknown when pulling 65674ac on gemnasium:dont-load-all-drivers-43 into ** on mattes:master**. |
This PR also includes fixed tests