shurcooL / vfsgen

Takes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.
MIT License
981 stars 83 forks source link

Possible to pack SQLite file? #72

Open TangMonk opened 5 years ago

TangMonk commented 5 years ago

I have a program that read data from local sqlite db, and show data to users, I wanna to pack all assets include sqlite file to one binary file, this program only execute read operation from sqlite, is it possible to pack sqlite file?

dmitshur commented 5 years ago

vfsgen can be used to embed arbitrary files, so yes, it's possible to include a sqlite database file.

Note that the http.FileSystem interface implementation that vfsgen produces is a read-only filesystem, so it can't be written to (directly).