g2cmd

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildInfoInstance = make(g2util.Map)

BuildInfoInstance ...

Functions

func BuildInfoInstanceAdd

func BuildInfoInstanceAdd(info g2util.Map)

BuildInfoInstanceAdd ...

func FlagsGetBoolFunc

func FlagsGetBoolFunc(cmd *cobra.Command, name string, fn func())

FlagsGetBoolFunc ...

Types

type G2cmd

type G2cmd struct {
	Logger g2util.LevelLogger `inject:""`
	Config *g2util.Config     `inject:""`
	AbFile *g2util.AbFile     `inject:""`
	// contains filtered or unexported fields
}

G2cmd ...

func (*G2cmd) CmdMap

func (g *G2cmd) CmdMap() map[string]Process

CmdMap ...

func (*G2cmd) Constructor

func (g *G2cmd) Constructor()

Constructor ...

func (*G2cmd) Execute

func (g *G2cmd) Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func (*G2cmd) RegisterCmd

func (g *G2cmd) RegisterCmd(cmd Process)

RegisterCmd ...注册cmd

func (*G2cmd) SetMigrateWorker added in v2.0.3

func (g *G2cmd) SetMigrateWorker(fn func())

SetMigrateWorker ...

func (*G2cmd) SetStartWorker added in v2.0.3

func (g *G2cmd) SetStartWorker(fn func())

SetStartWorker ...

type Process

type Process interface {
	Cmd() *cobra.Command
	SetFlags(cmd *cobra.Command)
	Run(cmd *cobra.Command, args []string)
}

Process ...

Jump to

Keyboard shortcuts

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