Skip to content
Randall O'Reilly edited this page Sep 2, 2024 · 3 revisions

Embedding files to create a standalone executable

It is important to use the standard Go embed package to create a standalone executable that doesn't require any supporting files.

For example, this kind of directive specifies the files to include:

//go:embed easy.tsv hard.tsv impossible.tsv
var content embed.FS

and then you can use an FS version of an Open method, e.g., for a Cogent Core table.Table:

ss.Easy.OpenFS(content, "easy.tsv", table.Tab)

test

Clone this wiki locally