cmd

package
v2.1.49 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRootCmd

func InitRootCmd(ctx context.Context)

func RegisterService

func RegisterService(s Service)

func Run

func Run()

Types

type Base

type Base struct {
}

func (*Base) Description

func (b *Base) Description() string

func (*Base) Name

func (b *Base) Name(child Service) string

func (*Base) Run

func (b *Base) Run(_ context.Context, cmd *cobra.Command, _ []string)

func (*Base) SetFlags added in v2.0.6

func (b *Base) SetFlags(_ *pflag.FlagSet)

type Service

type Service interface {
	Name(child Service) string
	Description() string
	Run(ctx context.Context, cmd *cobra.Command, args []string)
	SetFlags(flagSet *pflag.FlagSet)
}

Jump to

Keyboard shortcuts

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