1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00
Dušan Borovčanin 8b94199785
Update dependencies (#1564)
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-02-12 19:07:48 +01: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)
}