subcmds

package module
v0.0.0-...-78c8a5d Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: MIT Imports: 2 Imported by: 6

README

go-cli-cmds

Subcommand helpers for github.com/urfave/cli

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() []cli.Command

func RegisterCommand

func RegisterCommand(cmd cli.Command)

Types

type Collection

type Collection interface {
	Commands() []cli.Command
}

type Executor

type Executor interface {
	Execute(c *cli.Context) error
}

type ExecutorWithCommands

type ExecutorWithCommands interface {
	Executor
	Collection
}

type RegisterableCollection

type RegisterableCollection interface {
	Collection
	RegisterCommand(cmd cli.Command)
	Register(name, usage string, flags ...cli.Flag) RegistrationContext
}

func NewCollection

func NewCollection() RegisterableCollection

type RegistrationContext

type RegistrationContext interface {
	Configure(cfg func(cli.Command)) RegistrationContext
	Executor(exec Executor)
	Commands(coll Collection)
	ExecutorWithCommands(execColl ExecutorWithCommands)
}

func Register

func Register(name, usage string, flags ...cli.Flag) RegistrationContext

Jump to

Keyboard shortcuts

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