Files
kubesphere/vendor/github.com/rubenv/sql-migrate/migrate_go116.go
2023-02-12 23:09:20 +08:00

24 lines
425 B
Go

//go:build go1.16
// +build go1.16
package migrate
import (
"embed"
"net/http"
)
// A set of migrations loaded from an go1.16 embed.FS
type EmbedFileSystemMigrationSource struct {
FileSystem embed.FS
Root string
}
var _ MigrationSource = (*EmbedFileSystemMigrationSource)(nil)
func (f EmbedFileSystemMigrationSource) FindMigrations() ([]*Migration, error) {
return findMigrations(http.FS(f.FileSystem), f.Root)
}