cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cmd is a package that contains subcommands for the spare CLI command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute run process.

func Run

func Run(cmd *cobra.Command, args []string, subCmd SubCommand) error

Run runs the subcommand.

Types

type Doer

type Doer interface {
	Do() error
}

Doer is an interface that represents the behavior of a command.

type SubCommand

type SubCommand interface {
	Parse(cmd *cobra.Command, args []string) error
	Doer
}

SubCommand is an interface that represents the behavior of a command.

Jump to

Keyboard shortcuts

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