app

package
v0.0.0-...-a662229 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppNames

func AppNames() []string

func Register

func Register(name string, app AppEntry)

func Run

func Run(name string, ctx *Context) error

Types

type AppEntry

type AppEntry func(ctx *Context) error

func Get

func Get(name string) AppEntry

type Context

type Context struct {
	Args   []string
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	*chdir.Chdirfs
	// contains filtered or unexported fields
}

func (*Context) Flag

func (c *Context) Flag() *flag.FlagSet

func (*Context) Init

func (c *Context) Init()

func (*Context) LineReader

func (c *Context) LineReader() LineReader

func (*Context) ParseFlags

func (c *Context) ParseFlags() error

func (*Context) Printf

func (c *Context) Printf(fmtstr string, args ...interface{})

type LineReader

type LineReader interface {
	Prompt(string) (string, error)
	AppendHistory(string)
	SetAutoComplete(func(string) []string)
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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