Skip to content
Branch: master
Find file History
Latest commit 5059f0b Mar 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
go-bindata.go Fixes for govet Mar 22, 2019
go-bindata_test.go Use v4 for Go module support Oct 10, 2018



Read bindata with NewWithSourceInstance

go get -u
cd examples/migrations && go-bindata -pkg migrations .
import (

func main() {
  // wrap assets into Resource
  s := bindata.Resource(migrations.AssetNames(),
    func(name string) ([]byte, error) {
      return migrations.Asset(name)
  d, err := bindata.WithInstance(s)
  m, err := migrate.NewWithSourceInstance("go-bindata", d, "database://foobar")
  m.Up() // run your migrations and handle the errors above of course

Read bindata with URL (todo)

This will restore the assets in a tmp directory and then proxy to source/file. go-bindata must be in your $PATH.

migrate -source go-bindata://examples/migrations/bindata.go
You can’t perform that action at this time.