setup

package
v2.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugins

func Plugins() []plugins.Plugin

Types

type AfterSetuper

type AfterSetuper interface {
	plugins.Plugin
	AfterSetup(ctx context.Context, root string, args []string, err error) error
}

type Aliaser

type Aliaser interface {
	Setuper
	CmdAliases() []string
}

type BeforeSetuper

type BeforeSetuper interface {
	plugins.Plugin
	BeforeSetup(ctx context.Context, root string, args []string) error
}

type Cmd

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

func (*Cmd) Flags

func (cmd *Cmd) Flags() *pflag.FlagSet

func (*Cmd) Main

func (cmd *Cmd) Main(ctx context.Context, root string, args []string) error

func (Cmd) PluginName

func (cmd Cmd) PluginName() string

func (*Cmd) PrintFlags

func (cmd *Cmd) PrintFlags(w io.Writer) error

func (*Cmd) ScopedPlugins

func (cmd *Cmd) ScopedPlugins() []plugins.Plugin

func (*Cmd) SubCommands

func (cmd *Cmd) SubCommands() []plugins.Plugin

func (*Cmd) WithPlugins

func (cmd *Cmd) WithPlugins(f plugins.Feeder)

type Flagger

type Flagger interface {
	plugins.Plugin
	SetupFlags() []*flag.Flag
}

type Namer

type Namer interface {
	Setuper
	CmdName() string
}

type Pflagger

type Pflagger interface {
	plugins.Plugin
	SetupFlags() []*pflag.Flag
}

type Setuper

type Setuper interface {
	plugins.Plugin
	Setup(ctx context.Context, root string, args []string) error
}

func FindSetuper

func FindSetuper(name string, plugs []plugins.Plugin) Setuper

func FindSetuperFromArgs

func FindSetuperFromArgs(args []string, plugs []plugins.Plugin) Setuper

type Stdouter

type Stdouter = plugio.Outer

Jump to

Keyboard shortcuts

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