migrate/driver/bash/bash.go
Dave Jeffrey 0741616d2e Don't load in all drivers by default #40
Requires activating drivers with a _ style import, e.g.
import "_ github.com/mattes/migrate/driver/postgres"
2015-06-11 11:11:28 +01:00

38 lines
659 B
Go

// Package bash implements the Driver interface.
package bash
import (
"github.com/mattes/migrate/driver/registry"
"github.com/mattes/migrate/file"
_ "github.com/mattes/migrate/migrate/direction"
)
type Driver struct {
}
func (driver *Driver) Initialize(url string) error {
return nil
}
func (driver *Driver) Close() error {
return nil
}
func (driver *Driver) FilenameExtension() string {
return "sh"
}
func (driver *Driver) Migrate(f file.File, pipe chan interface{}) {
defer close(pipe)
pipe <- f
return
}
func (driver *Driver) Version() (uint64, error) {
return uint64(0), nil
}
func init() {
registry.RegisterDriver("bash", Driver{})
}