cmd

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddCmd = &cobra.Command{
	Use:   "add",
	Short: "新建命令",
	Run:   runStore,
}
View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: "删除命令",
	Run:   runDelete,
	Args:  cobra.ExactArgs(1),
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "列出所有命令",
	Run:   runList,
}
View Source
var RunCmd = &cobra.Command{
	Use:   "run",
	Short: "运行命令",
	Run:   runCmd,
	Args:  cobra.ExactArgs(1),
}
View Source
var UpdateCmd = &cobra.Command{
	Use:   "update",
	Short: "更新命令",
	Run:   runUpdate,
	Args:  cobra.ExactArgs(1),
}

Functions

func Add added in v0.0.3

func Add(command core.Command) (*core.Command, error)

func Delete

func Delete(id int) error

func Get added in v0.0.3

func Get(id int) (*core.Command, error)

func Init

func Init(file string)

func List

func List() ([]core.Command, error)

func Update

func Update(id int, command core.Command) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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