console

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 1 Imported by: 56

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artisan

type Artisan interface {
	//Register commands.
	Register(commands []Command)

	//Call Run an Artisan console command by name.
	Call(command string)

	//CallAndExit Run an Artisan console command by name and exit.
	CallAndExit(command string)

	//Run a command. args include: ["./main", "artisan", "command"]
	Run(args []string, exitIfArtisan bool)
}

type Command added in v0.4.0

type Command interface {
	//Signature The name and signature of the console command.
	Signature() string
	//Description The console command description.
	Description() string
	//Extend The console command extend.
	Extend() command.Extend
	//Handle Execute the console command.
	Handle(ctx Context) error
}

type Context added in v1.0.0

type Context interface {
	Argument(index int) string
	Arguments() []string
	Option(key string) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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