Files
Halcyon/examples/examples.go
T
2026-09-19 20:21:47 +02:00

23 lines
389 B
Go

// Package examples embeds the sample ship programs so the web site can offer
// them in its editor.
package examples
import (
"embed"
"io/fs"
)
//go:embed programs/*.s
var embedded embed.FS
// FS holds the programs, one file per program, at its root.
var FS = mustSub()
func mustSub() fs.FS {
sub, err := fs.Sub(embedded, "programs")
if err != nil {
panic(err)
}
return sub
}