cli

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactArgs

func ExactArgs(n int) cobra.PositionalArgs

ExactArgs returns an error if there are not exactly n args.

func MinimumNArgs

func MinimumNArgs(n int) cobra.PositionalArgs

MinimumNArgs returns an error if there is not at least N args.

func ParseFloat

func ParseFloat(value string) (float64, error)

func ParseInteger

func ParseInteger(strId string, idType string) (int, error)

func ParseProductId added in v0.16.0

func ParseProductId(id string) (string, error)

func ParseYearMonth

func ParseYearMonth(yearMonth string) (time.Time, error)

func RangeArgs

func RangeArgs(min int, max int) cobra.PositionalArgs

RangeArgs returns an error if the number of args is not within the expected range.

Types

type Cmd

type Cmd interface {
	Cmd() *cobra.Command
}

type CmdManager

type CmdManager interface {
	AddCommand(cmd Cmd)
	AddTmpCommand(cmd *cobra.Command) //TODO remove
	Execute()
}

func NewCmdManager

func NewCmdManager(cfgService ports.ConfigService) CmdManager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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