list

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package list creates a TUI list based on the contents specified in a structure, and returns the selected row.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowServersView added in v0.6.13

func ShowServersView(cf *conf.Config, prompt string, names []string, isMulti bool) []string

ShowServersView shows view for servers.

Types

type ArrayInfo added in v0.6.13

type ArrayInfo struct {
	Name    string
	Connect string
	Note    string
}

ArrayInfo ...

type Info added in v0.6.13

type Info struct {
	// Incremental search line prompt string
	Prompt string

	Title string
	RowFn func(name string) string

	NameList   []string
	SelectName []string
	DataText   []string // all data text list
	ViewText   []string // filtered text list
	MultiFlag  bool     // multi select flag
	Keyword    string   // input keyword
	CursorLine int      // cursor line
	Term       TermInfo
}

Info ...

func (*Info) DeleteRune added in v1.0.1

func (l *Info) DeleteRune()

DeleteRune deletes rune at search keywords(l.Keyword).

func (*Info) InsertRune added in v1.0.1

func (l *Info) InsertRune(inputRune rune)

InsertRune adds rune to search keywords(l.Keyword).

func (*Info) SetTitle added in v0.6.13

func (l *Info) SetTitle(titleColumns []string)

SetTitle sets the view's title columns.

func (*Info) View added in v0.6.13

func (l *Info) View()

View displays the list in TUI.

type TermInfo

type TermInfo struct {
	Headline        int
	LeftMargin      int
	Color           int
	BackgroundColor int
}

TermInfo ...

Jump to

Keyboard shortcuts

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