From 2361a7aa2429f4184e9313e806bf5debf5fb5065 Mon Sep 17 00:00:00 2001 From: Martin Magakian Date: Mon, 3 Jul 2017 15:29:15 +0200 Subject: [PATCH] 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) --- source/go-bindata/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/go-bindata/README.md b/source/go-bindata/README.md index e034564..e74a0aa 100644 --- a/source/go-bindata/README.md +++ b/source/go-bindata/README.md @@ -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 } ```