common

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(app *cli.App, commands ...basicFunction)

Used to attach subCommands to their relative base commands Ex: `tau new project` project is attached to the new command

Types

type Basic

type Basic interface {
	New() Command
	Edit() Command
	Delete() Command
	Query() Command
	List() Command
	Select() Command
	Clone() Command
	Push() Command
	Pull() Command
	Checkout() Command

	// Sets the following in the command if not already set:
	// Name
	// Aliases
	// Also runs the options provided
	Base() (*cli.Command, []Option)
}

type BeforeHandler

type BeforeHandler interface {
	Shift(method cli.BeforeFunc)
	Push(method cli.BeforeFunc)
}

type Command

type Command interface {
	Raw() *cli.Command
	Parent() *cli.Command
	Options() []Option
	Initialize(parentCommand *cli.Command, baseCommand *cli.Command, baseOps []Option) *cli.Command
}
var NotImplemented Command = nil

func Create

func Create(cmd *cli.Command, ops ...Option) Command

type FlagHandler

type FlagHandler interface {
	Shift(flags ...cli.Flag)
	Push(flags ...cli.Flag)
}

type Linker

type Linker interface {
	Command
	Before() BeforeHandler
	Flags() FlagHandler
}

type Option

type Option func(Linker)

func Base

func Base(cmd *cli.Command, ops ...Option) (*cli.Command, []Option)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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