pkg

package
v0.0.0-...-5d28019 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCommandText

func InitCommandText(commands []Command)

InitCommandText returns a help text for the user at the command line.

func StartCommandLine

func StartCommandLine(commands []Command) error

StartCommandLine executes and initializes the entire command line routine of the application

Types

type Command

type Command interface {
	Name() string
	Example() string
	Help() string
	LongHelp() string
	Register(*flag.FlagSet)
	Run()
}

Command is an interface responsible for setting the default format for the command line

type UserCommand

type UserCommand struct {
	Command   string
	Arguments []string
}

UserCommand is a standardized structure for command line calls

func ArgumentsFilter

func ArgumentsFilter(commands []string) UserCommand

ArgumentsFilter is responsible for standardizing the call of users

Jump to

Keyboard shortcuts

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