app

package
v0.0.0-...-14dca07 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppOption

type AppOption = func(app *FishermanApp)

func WithCommands

func WithCommands(commands []internal.CliCommand) AppOption

WithCommands setups commands lists for application.

func WithCwd

func WithCwd(cwd string) AppOption

WithCwd setups current working directory (CWD) for application.

func WithInterruptChanel

func WithInterruptChanel(chanel chan os.Signal) AppOption

func WithSistermInterruptSignals

func WithSistermInterruptSignals() AppOption

type CliCommands

type CliCommands []internal.CliCommand

CliCommands is commands collection type.

func (CliCommands) GetCommand

func (commands CliCommands) GetCommand(commandName string) (internal.CliCommand, error)

GetCommand returns command object by name.

type FishermanApp

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

FishermanApp is main application structure.

func NewFishermanApp

func NewFishermanApp(options ...AppOption) *FishermanApp

NewFishermanApp is an fisherman application constructor.

func (*FishermanApp) PrintDefaults

func (r *FishermanApp) PrintDefaults()

PrintDefaults prints custom information output.

func (*FishermanApp) Run

func (r *FishermanApp) Run(baseCtx context.Context, args []string) error

Run runs fisherman application.

Jump to

Keyboard shortcuts

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