widgets

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 23 Imported by: ? modules, 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

Index

Constants

This section is empty.

Variables

View Source
var ErrSwitch = errors.New("switch")

Functions

func Colorize

func Colorize(name string, content []byte, out io.Writer) error

func Form

func Form(c params.CLIContext, sshOptions bool) (params.CLIContext, error)

func ShowFile

func ShowFile(fname string, content []byte, external bool) error

func ShowFileInternal

func ShowFileInternal(fname string, content []byte) error

func ShowFileInternalWidget

func ShowFileInternalWidget(fname string, content []byte) (*tview.TextView, error)

func TableOfFiles

func TableOfFiles(wd string, callback SelectedCallback, readFile func(string) ([]byte, error), remote bool) error

Types

type SelectedAction

type SelectedAction uint8
const (
	Init SelectedAction = iota
	OpenDir
	OpenFile
	DeleteFile
	DeleteDir
	EditFile
)

type SelectedCallback

type SelectedCallback func(*SelectedFile) ([]os.FileInfo, error)

type SelectedFile

type SelectedFile struct {
	Name     string
	Size     int64
	Mode     os.FileMode
	Position int
	Action   SelectedAction
	IsDir    bool
	Err      error
}

type UFiles

type UFiles struct {
	AllFiles   []sys.UFile
	Dirs       []sys.UFile
	Regulars   []sys.UFile
	Irregulars []sys.UFile
}

func (*UFiles) Init

func (all *UFiles) Init(files []os.FileInfo, remote bool) *UFiles

Jump to

Keyboard shortcuts

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