Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.0.0-...-9bc40e8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package tui is the terminal interface: a Bubble Tea program over the editing operations in internal/savegame. It owns presentation and key handling only — every change it makes goes through the domain package, so the rules about what a save may contain live in one place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cat *catalog.Catalog, opts Options) error

Run starts the interactive editor.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the root Bubble Tea model.

func New

func New(cat *catalog.Catalog, opts Options) Model

New builds the root model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

type Options

type Options struct {
	// Language selects the interface language.
	Language catalog.Language
	// SavesDir overrides save discovery. Empty means detect.
	SavesDir string
	// SavePath opens one save directly, skipping the picker.
	SavePath string
}

Options configure a run of the editor.

Jump to

Keyboard shortcuts

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