cmd

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GofsDir = ".gofs"
)

Variables

View Source
var Gofs = New("gofs", "A tool for generating golang full stack apps.")

Functions

This section is empty.

Types

type Cli

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

func New

func New(name, long string) *Cli

func (*Cli) AddCmd

func (c *Cli) AddCmd(cmd Command)

func (*Cli) Find

func (c *Cli) Find(cmd string) (Command, bool)

func (*Cli) Run

func (c *Cli) Run()

type Command

type Command struct {
	// The command name, used to match the command line argument e.g. clitool <Name>.
	Name string
	// Short is used in the list of commands message e.g. "command does xyz"
	Short string
	// Long is used in the usage message from the help command e.g.:
	// "Usage: <Name> [args]
	//
	// "<Long>"
	Long string
	// Cmd is the function that is called when the command is matched.
	Cmd func()
}

Jump to

Keyboard shortcuts

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