Closed thomasf closed 3 years ago
Hi @thomasf, did you manage to use embed.FS ?
Yes, the code pasted above works. I created a pull request as well but it broke backwards compatibility with tools ( https://github.com/jackc/tern/pull/29#issuecomment-909886537 ) so I didn't want to have it merged. It would probably be ok to merge it now though IIRC, it should work as far back as some of the later Go 1.15 point releases now and 1.15 is already an unsupported version since a while now.
Since go1.16 is released now I just added this to a project to integrate with embed.FS.
It would probably be handy to have built in and io.fs probably won't be going anywhere soon.
Something like this maybe with an exported constructor function. Maybe with build in support to specify a subdirectory
NewIOFSMigratorFS(fs.FS)
would make it clear which migratorfs it is but that name is kind of a mouthful.