cobrautils

package
v0.0.0-...-dc44714 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindSubCmds

func BindSubCmds(root *cobra.Command)

func CallCmd

func CallCmd(me *cobra.Command, target cobra.Command, args ...string) error

func CmdUtils

func CmdUtils(c *cobra.Command) *cmd

func GetSubCmds

func GetSubCmds() []*cobra.Command

func RegisterSubCmd

func RegisterSubCmd(cmds ...*cobra.Command)

Types

type Registory

type Registory []*cobra.Command

func (*Registory) BindSubCmds

func (r *Registory) BindSubCmds(root *cobra.Command)

サブコマンドをRootに追加する

func (*Registory) GetSubCmds

func (r *Registory) GetSubCmds() []*cobra.Command

サブコマンドの一覧を取得する

func (*Registory) RegisterSubCmd

func (r *Registory) RegisterSubCmd(cmds ...*cobra.Command)

サブコマンドを追加する

Jump to

Keyboard shortcuts

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