Update README.md

Code snippet don't compile.
It's missing a step (see https://github.com/mattes/migrate/blob/master/source/go-bindata/go-bindata_test.go)
This commit is contained in:
Martin Magakian 2017-07-03 15:29:15 +02:00 committed by GitHub
parent da4160ce04
commit 2361a7aa24
1 changed files with 6 additions and 1 deletions

View File

@ -24,8 +24,13 @@ func main() {
func(name string) ([]byte, error) {
return migrations.Asset(name)
})
d, err := WithInstance(s)
if err != nil {
t.Fatal(err)
}
m, err := migrate.NewWithSourceInstance("go-bindata", s, "database://foobar")
m, err := migrate.NewWithSourceInstance("go-bindata", d, "database://foobar")
m.Up() // run your migrations and handle the errors above of course
}
```