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

demo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatScenarioList added in v0.7.0

func FormatScenarioList() string

FormatScenarioList renders all scenarios with one-line descriptions.

func IsScenarioListName added in v0.7.0

func IsScenarioListName(name string) bool

IsScenarioListName reports whether name requests scenario listing.

func SetupProject

func SetupProject() (string, func(), error)

SetupProject creates a temporary directory with a realistic Go project and git history for exploring grut without needing your own repository. Returns the project path and a cleanup function that removes the temporary directory.

Types

type Scenario added in v0.7.0

type Scenario struct {
	Name        string
	Description string
	Layout      string
	FocusPanel  string
	Guide       []string
	// contains filtered or unexported fields
}

Scenario describes a guided demo walkthrough and its initial UI state.

func LookupScenario added in v0.7.0

func LookupScenario(name string) (Scenario, bool)

LookupScenario returns a scenario by name.

func Scenarios added in v0.7.0

func Scenarios() []Scenario

Scenarios returns the guided demo scenarios in CLI display order.

type ScenarioSetup added in v0.7.0

type ScenarioSetup struct {
	Dir       string
	Scenario  *Scenario
	GuidePath string
}

ScenarioSetup describes the project path and selected scenario returned by SetupProjectWithOptions.

func SetupProjectWithOptions added in v0.7.0

func SetupProjectWithOptions(opts SetupOptions) (*ScenarioSetup, func(), error)

SetupProjectWithOptions creates a demo project and optionally applies a guided scenario.

type SetupOptions added in v0.7.0

type SetupOptions struct {
	Scenario string
	Keep     bool
}

SetupOptions controls demo project creation.

Jump to

Keyboard shortcuts

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