cmd

package
v0.0.0-...-42b7f2b Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSubcommand = errors.New("you must pass a sub-command")
View Source
var ErrNotReady = errors.New("cmd.Interface not ready. Must execute cmd.Interface.Init() before running")

Functions

func RunSubcommand

func RunSubcommand(cmds []Interface, args []string) error

Types

type Interface

type Interface interface {
	Name() string
	Run() error // If Init() wasn't executed, drops ErrNotReady
	Init([]string) error
}

Jump to

Keyboard shortcuts

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