cli

package
v0.0.0-...-1cdf2d7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Overview

Package cli provides a command line interface that allows for interaction with a Seesaw cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCommand

func FindCommand(cmdline string) (*Command, *[]Command, []*Command, []string)

FindCommand tokenises a command line and attempts to locate the corresponding Command. If a matching command is found it is returned, along with the remaining arguments. If the command has sub-commands then the list of sub-commands is returned instead. A chain of matched commands is also returned, along with the slice of remaining arguments.

Types

type Command

type Command struct {
	Command     string
	Subcommands *[]Command
	// contains filtered or unexported fields
}

Command represents a command that can be executed from the CLI.

type SeesawCLI

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

SeesawCLI represents a Seesaw command line interface.

func NewSeesawCLI

func NewSeesawCLI(conn *conn.Seesaw, exit func()) *SeesawCLI

NewSeesawCLI returns a new Seesaw command line interface.

func (*SeesawCLI) Execute

func (cli *SeesawCLI) Execute(cmdline string) error

Execute executes the given command line.

Jump to

Keyboard shortcuts

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