cli

package
v0.0.0-...-f282198 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alias

func Alias(name string, alias string)

func Commands

func Commands() map[string]Command

func Register

func Register(name string, c Command, unreleased ...bool)

func Run

func Run(args []string) int

func ShowUnreleased

func ShowUnreleased() bool

Types

type Command

type Command interface {
	HasFlags

	Run(ctx context.Context, f *flag.FlagSet) error
}

type HasFlags

type HasFlags interface {
	// Register may be called more than once and should be idempotent.
	Register(ctx context.Context, f *flag.FlagSet)

	// Process may be called more than once and should be idempotent.
	Process(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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