console

package
v0.0.0-...-9e9a7a5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	*Wrapper
	// contains filtered or unexported fields
}

func NewApp

func NewApp() (a *Application)

func (*Application) AddCommand

func (a *Application) AddCommand(c CommandInterface)

func (*Application) Run

func (a *Application) Run() (err error)

type Argument

type Argument struct {
	Name  string
	Arg   interface{}
	Value interface{}
	Usage string
}

type CommandInterface

type CommandInterface interface {
	Configure()
	Execute() error
	Name() string
	AddArgument(arg *Argument)
	Args() []*Argument
	SetApp(a *Application)
	App() *Application
}

type CommandTraits

type CommandTraits struct {
	// contains filtered or unexported fields
}

func (*CommandTraits) AddArgument

func (c *CommandTraits) AddArgument(arg *Argument)

func (*CommandTraits) App

func (c *CommandTraits) App() *Application

func (*CommandTraits) Args

func (c *CommandTraits) Args() []*Argument

func (*CommandTraits) SetApp

func (c *CommandTraits) SetApp(a *Application)

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

func NewWrapper

func NewWrapper() (w *Wrapper)

func (*Wrapper) Go

func (w *Wrapper) Go(f func(args ...interface{}), args ...interface{}) *Wrapper

func (*Wrapper) GoLoop

func (w *Wrapper) GoLoop(f func()) *Wrapper

func (*Wrapper) HandleShutdown

func (w *Wrapper) HandleShutdown(f func()) *Wrapper

func (*Wrapper) HandleSignal

func (w *Wrapper) HandleSignal(f func(), s ...os.Signal) *Wrapper

func (*Wrapper) Wait

func (w *Wrapper) Wait()

Jump to

Keyboard shortcuts

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