application

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application represents structure of application.

func NewApplication

func NewApplication(options Options) *Application

NewApplication creates new instance of application

func (*Application) FlagRegistrar

func (application *Application) FlagRegistrar() *pflag.FlagSet

FlagRegistrar exposes interface to work with application flags

func (*Application) RegisterCommand

func (application *Application) RegisterCommand(command *cobra.Command)

RegisterCommand registers new application command

func (*Application) RegisterSubCommand

func (application *Application) RegisterSubCommand(parentCommand *cobra.Command, command *cobra.Command)

RegisterSubCommand registers new application sub-command

func (*Application) Start

func (application *Application) Start() error

Start starts application execution

type Options

type Options struct {
	ShortDescription       string
	LongDescription        string
	HasConfiguration       bool
	ConfigurationPath      string
	ConfigurationFile      string
	ConfigurationEnvPrefix string
}

Options represents structure of application options.

Jump to

Keyboard shortcuts

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