Documentation
¶
Overview ¶
vfs-embed example: bundle a SQLite database inside an embed.FS and open it read-only via the vfs sub-package. The DB never has to be unpacked to disk at runtime — useful for CLI tools that ship with seed data.
To run this example you'd typically generate seed.db once at build time; here we synthesize the bytes via sqlite.Serialize on an in-memory DB and stash them in an fstest.MapFS so the rest of the flow matches the embed.FS case verbatim. Nothing touches the disk.
Click to show internal directories.
Click to hide internal directories.