cli

package
v0.0.0-...-344c929 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func App

func App() *cli.App

App returns the cli app within the default command.

func Register

func Register(cmds ...*cli.Command)

Register appends commands to the default app.

func Run

func Run()

Run runs the cli app within the default command. On error, it prints the error message and exits.

Types

type CLI

type CLI interface {
	App() *cli.App
	Run() error
}

CLI is the interface that wraps the cli app.

CLI embeds the Cmd interface from the go-micro.dev/v4/cmd package and adds a Run method.

Run runs the cli app within this command and exits on error.

var (
	// DefaultCLI is the default, unmodified root command.
	DefaultCLI CLI = NewCLI()
)

func NewCLI

func NewCLI() CLI

NewCLI returns a new command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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