shell

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

App is the global shell app.

View Source
var NameWithVersion = "Pegasus-AdminCli-1.1.0"

Functions

func AddCommand

func AddCommand(cmd *grumble.Command)

AddCommand registers the command to the global shell app.

func RequireUseTable

func RequireUseTable(run func(*Context) error) func(c *grumble.Context) error

RequireUseTable is a wrapper of grumble.Command.Run. The command will fail if no table was selected.

func SetUseTable

func SetUseTable(tb string)

SetUseTable selects a table for the following commands.

Types

type Context

type Context struct {
	*grumble.Context

	// The used table.
	UseTable string
}

Context is the command execution context.

Jump to

Keyboard shortcuts

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