migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Refactor Source to use fs.FS under the hood.

Open SpeedyCoder opened this issue 3 years ago • 0 comments

This will allow users to pass in any FS implementation. For example embed.FS, that allows usage of embedded migration files. Given that fs.FS is read only I had to modify the Create functionality. I've removed the method from the Source struct and moved the logic into the Create function and changed its signature to take path instead of Source struct. This is only a helper function, so I think even though it's a breaking change it should be fine to make.

SpeedyCoder avatar Nov 22 '21 10:11 SpeedyCoder