diff --git a/migrate_go116.go b/migrate_go116.go deleted file mode 100644 index a1c94a3d..00000000 --- a/migrate_go116.go +++ /dev/null @@ -1,23 +0,0 @@ -//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) -} diff --git a/migrate_go116_test.go b/migrate_go116_test.go deleted file mode 100644 index 2805eaf9..00000000 --- a/migrate_go116_test.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -package migrate - -import ( - "embed" - - . "gopkg.in/check.v1" -) - -//go:embed test-migrations/* -var testEmbedFS embed.FS - -func (s *SqliteMigrateSuite) TestEmbedSource(c *C) { - migrations := EmbedFileSystemMigrationSource{ - FileSystem: testEmbedFS, - Root: "test-migrations", - } - - // Executes two migrations - n, err := Exec(s.Db, "sqlite3", migrations, Up) - c.Assert(err, IsNil) - c.Assert(n, Equals, 2) - - // Has data - id, err := s.DbMap.SelectInt("SELECT id FROM people") - c.Assert(err, IsNil) - c.Assert(id, Equals, int64(1)) -}