Documentation
¶
Overview ¶
Package bom provides a Fyne GUI wrapper library that turns any CLI TUI application into a native desktop app. It has two roles:
- At build time: generate a customized main.go for the host project from an embedded template via Generate().
- At runtime: resolve the CLI binary and launch it inside a Fyne terminal emulator widget via Run().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(data TemplateData) (string, error)
Generate renders the main.go template with the given data and returns the resulting Go source as a string.
Types ¶
type Config ¶
type Config struct {
// CLIBinaryName is the name of the CLI binary to launch (required).
CLIBinaryName string
// AppID is the application identifier, e.g. "com.curiosa.estreia".
AppID string
// AppName is the window title. Defaults to CLIBinaryName.
AppName string
// WindowWidth and WindowHeight set the initial window size.
WindowWidth float32
WindowHeight float32
// EmbeddedBinaries is the embedded filesystem from the host project
// containing CLI binaries. May be nil if only PATH/env resolution
// is desired.
EmbeddedBinaries *embed.FS
// EmbeddedDir is the directory prefix inside EmbeddedBinaries.
// Defaults to "embedded".
EmbeddedDir string
}
Config holds the runtime wrapper configuration.
type TemplateData ¶
type TemplateData struct {
CLIBinaryName string // e.g. "estreia"
AppID string // e.g. "com.curiosa.estreia"
AppName string // e.g. "Estreia"
WindowWidth string // e.g. "900"
WindowHeight string // e.g. "600"
ModulePath string // e.g. "codeberg.org/curiosa/estreia"
}
TemplateData holds the values substituted into main.go.tmpl.
Click to show internal directories.
Click to hide internal directories.