cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags = map[string]bool{"a": false}

Functions

func ParseFlags

func ParseFlags(args []string) []string

Types

type Command

type Command struct {
	Name string
	Args []string
	F    func([]string) error
}

func (*Command) Execute

func (c *Command) Execute(args []string) error

type Commands

type Commands struct {
	Commands map[string]Command
}

func NewCommands

func NewCommands() *Commands

func (*Commands) AddCommand

func (c *Commands) AddCommand(name string, f func([]string) error)

func (*Commands) Exec

func (c *Commands) Exec(args []string) error

Jump to

Keyboard shortcuts

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