setupflow

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package setupflow is the question surface a setup flow on the gateway asks the terminal UI through

Index

Constants

This section is empty.

Variables

View Source
var ErrCancelled = errors.New("setup cancelled")

ErrCancelled ends a flow the user left

Functions

func Lines

func Lines(ask Asker) io.Writer

Lines is a writer whose output the asker says line by line

Types

type Asker

type Asker interface {
	Say(line string)
	Choose(question string, options []Option, def int) (int, error)
	Check(question string, items []Item, selected map[int]bool, tokens map[string]int) (map[int]bool, error)
	Text(question, def string, secret bool) (string, error)
}

Asker is what a setup flow prints and asks through, every question blocking until the user answers

type Item

type Item struct {
	Title  string
	Detail string
	Tools  []string
}

Item is one row of a multi choice, the tools it brings feeding the context estimate

type Option

type Option struct {
	Title  string
	Detail string
}

Option is one row of a single choice

Jump to

Keyboard shortcuts

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