cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(zero interface{}, use string, short string, ops ...CmdOption)

Cmd create and add a command. Zero must be of type 'struct { *one.Command }'.

func Func

func Func(run func(args []string), use string, short string, ops ...CmdOption)

func Run

func Run(ops ...CmdOption)

Types

type CmdOption

type CmdOption func(*cobra.Command)

func Long

func Long(msg string) CmdOption

func Name

func Name(name string) CmdOption

type Command

type Command struct {
	*cobra.Command
}

func (*Command) CorbaCommand

func (c *Command) CorbaCommand(ins interface{}, use string, short string) *cobra.Command

Jump to

Keyboard shortcuts

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