demo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigCommand = &cobra.Command{
	Use:   "config",
	Short: "获取配置文件",
	Long:  "获取配置文件",
	RunE: func(cmd *cobra.Command, args []string) error {
		log.Println("execute config command")
		return nil
	},
}
View Source
var Foo1Command = &cobra.Command{
	Use:     "foo1",
	Short:   "foo1简要说明",
	Long:    "foo1的详细描述",
	Aliases: []string{"fo1", "f1"},
	Example: "foo1的命令例子",
	RunE: func(cmd *cobra.Command, args []string) error {
		container := cmd.GetContainer()
		log.Println(container)
		return nil
	},
}
View Source
var FooCommand = &cobra.Command{
	Use:     "foo",
	Short:   "foo简要说明",
	Long:    "foo的详细描述",
	Aliases: []string{"fo", "f"},
	Example: "foo的命令例子",
	RunE: func(cmd *cobra.Command, args []string) error {

		log.Println("execute foo command")
		return nil
	},
}

Functions

func InitFoo

func InitFoo() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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