app

package
v0.0.0-...-c2c271f Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionFunc

type ActionFunc func(*cli.Context) error

type App

type App struct {
	Api api.ServiceProvider
	Cmd Commander
}

func New

func New() *App

func (*App) Run

func (a *App) Run() error

type Cmd

type Cmd struct {
	*cli.App
}

func (*Cmd) SetAction

func (c *Cmd) SetAction(action ActionFunc)

func (*Cmd) SetFlags

func (c *Cmd) SetFlags(flags []cli.Flag)

func (*Cmd) SetName

func (c *Cmd) SetName(name string)

func (*Cmd) SetUsage

func (c *Cmd) SetUsage(usage string)

func (*Cmd) SetVersion

func (c *Cmd) SetVersion(version string)

type Commander

type Commander interface {
	SetName(string)
	SetVersion(string)
	SetUsage(string)
	SetFlags([]cli.Flag)
	SetAction(ActionFunc)
	Run([]string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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