helpers

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagHelperTest

func FlagHelperTest(arguments []string, plugin CommandPlugin, callback func())

Types

type CommandHelper

type CommandHelper struct {
	Command *cli.Command
	Plugins []CommandPlugin
	Action  func(cCtx *cli.Context) error
}

func (*CommandHelper) AddPlugin

func (this *CommandHelper) AddPlugin(plugin CommandPlugin)

func (*CommandHelper) GetCommand

func (this *CommandHelper) GetCommand() *cli.Command

type CommandPlugin

type CommandPlugin interface {
	HandleCommand(cmd *cli.Command) error
	HandleContext(cCtx *cli.Context) error
}

type FlagHelper

type FlagHelper struct {
	Prefix   string
	Name     string
	Category string
	Value    string
	Usage    string
	Required bool
	// contains filtered or unexported fields
}

func (*FlagHelper) GetEnvVar

func (this *FlagHelper) GetEnvVar() string

func (*FlagHelper) GetFlagName

func (this *FlagHelper) GetFlagName() string

func (*FlagHelper) StringFlag

func (this *FlagHelper) StringFlag() *cli.StringFlag

func (*FlagHelper) StringValue

func (this *FlagHelper) StringValue(cCtx *cli.Context) string

Jump to

Keyboard shortcuts

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