embed

command
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL