6 ms·
This should be pretty straight forward without special support. Do the embedding and create a function that returns the fs.FS with your files in it. Put that in
by SamWhited 6y ago
This should be pretty straight forward without special support. Do the embedding and create a function that returns the fs.FS with your files in it. Put that in a file with a build tag or something, // +build !dev and then put the same function that returns an fs.FS that points at the filesystem in another file and add the build tag // +build dev or something along those lines. Now you can do go build -tags dev to get the filesystem versions, or build normally to get the "release" version where it's embedded.