command

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[string]Command{
	"check":   &CheckCommand{},
	"pin":     &PinCommand{},
	"unpin":   &UnpinCommand{},
	"update":  &UpdateCommand{},
	"upgrade": &UpgradeCommand{},
}

Commands is the main list of all commands.

Functions

func Run

func Run(ctx context.Context, args []string) error

Run executes the main entrypoint for the CLI.

Types

type CheckCommand added in v0.1.2

type CheckCommand struct {
	// contains filtered or unexported fields
}

func (*CheckCommand) Desc added in v0.1.2

func (c *CheckCommand) Desc() string

func (*CheckCommand) Flags added in v0.1.2

func (c *CheckCommand) Flags() *flag.FlagSet

func (*CheckCommand) Run added in v0.1.2

func (c *CheckCommand) Run(ctx context.Context, originalArgs []string) error

type Command

type Command interface {
	Desc() string
	Run(ctx context.Context, args []string) error
}

Command is the interface for a subcommand.

type PinCommand

type PinCommand struct {
	// contains filtered or unexported fields
}

func (*PinCommand) Desc

func (c *PinCommand) Desc() string

func (*PinCommand) Flags

func (c *PinCommand) Flags() *flag.FlagSet

func (*PinCommand) Run

func (c *PinCommand) Run(ctx context.Context, originalArgs []string) error

type UnpinCommand

type UnpinCommand struct {
	// contains filtered or unexported fields
}

func (*UnpinCommand) Desc

func (c *UnpinCommand) Desc() string

func (*UnpinCommand) Flags

func (c *UnpinCommand) Flags() *flag.FlagSet

func (*UnpinCommand) Run

func (c *UnpinCommand) Run(ctx context.Context, originalArgs []string) error

type UpdateCommand

type UpdateCommand struct {
	PinCommand
}

func (*UpdateCommand) Desc

func (c *UpdateCommand) Desc() string

func (*UpdateCommand) Flags

func (c *UpdateCommand) Flags() *flag.FlagSet

func (*UpdateCommand) Run

func (c *UpdateCommand) Run(ctx context.Context, originalArgs []string) error

type UpgradeCommand added in v0.7.0

type UpgradeCommand struct {
	// contains filtered or unexported fields
}

func (*UpgradeCommand) Desc added in v0.7.0

func (c *UpgradeCommand) Desc() string

func (*UpgradeCommand) Flags added in v0.7.0

func (c *UpgradeCommand) Flags() *flag.FlagSet

func (*UpgradeCommand) Run added in v0.7.0

func (c *UpgradeCommand) Run(ctx context.Context, originalArgs []string) error

Directories

Path Synopsis
cmd
gen

Jump to

Keyboard shortcuts

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