cli

package
v0.0.0-...-79a645e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NumbersMode int

NumbersMode determines which numbers format a PrintableSize should render to.

View Source
var RootCommand = &cobra.Command{
	Use:   "vorteil",
	Short: "Vorteil's command-line interface",
	Long: `Vorteil's command-line interface provides a complete set of tools for developers
to create, test, optimize, and build Vorteil apps.`,
}

Functions

func AddNewProvisionerCmd

func AddNewProvisionerCmd(newCmd *cobra.Command)

AddNewProvisionerCmd - Append a command to the `vorteil provisioners new` command

func HandleErrors

func HandleErrors()

func InitializeCommands

func InitializeCommands()

func PlainTable

func PlainTable(vals [][]string)

PlainTable prints data in a grid, handling alignment automatically.

func SetError

func SetError(err error, code int)

SetError sets the global variables for when the process exits to display accordingly

func SetNumberModeFlagCMD

func SetNumberModeFlagCMD(cmd *cobra.Command) error

SetNumberModeFlagCMD : Will SetNumberMode to the value of the cmd flag 'numbers'

func SetNumbersMode

func SetNumbersMode(s string) error

SetNumbersMode parses s and sets NumbersMode accordingly.

Types

type PrintableSize

type PrintableSize int

PrintableSize is a wrapper around int to alter its string formatting behaviour.

func (PrintableSize) String

func (c PrintableSize) String() string

String returns a string representation of the PrintableSize, formatted according to the global NumbersMode.

Jump to

Keyboard shortcuts

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