migrate: add support for new Go io/fs.FS

This patch adds FromFS function and lets you use the new go:embed directive to add the migration files to the binary.
Also, migration tests use an in memory FS impl instead of working with tmp directories.
This commit is contained in:
Michał Matczuk
2021-04-29 18:19:32 +02:00
committed by Michal Jan Matczuk
parent 7980a955be
commit fe1498fe13
6 changed files with 73 additions and 107 deletions

4
go.mod
View File

@@ -3,10 +3,10 @@ module github.com/scylladb/gocqlx/v2
go 1.16
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gocql/gocql v0.0.0-20200131111108-92af2e088537
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-cmp v0.2.0
github.com/google/go-cmp v0.5.4
github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef
github.com/scylladb/go-reflectx v1.0.1
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
gopkg.in/inf.v0 v0.9.1