cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Actions = map[string]func([]string, *config.Config) error{
	"configure": configure,
}

Actions are the available CLI commands.

Functions

func NewError

func NewError(title, msg string) error

NewError creates a colored error from the given information.

The standard format is

``` <code> [<context>] <title>

<msg> ```

func ShowError

func ShowError(title, msg string)

ShowError displays the given error in the user-specified format.

func ToSentence

func ToSentence(words []string, andOrOr string) string

ToSentence converts a slice of terms into sentence.

Types

type CLIFlags

type CLIFlags struct {
	To       string
	Help     bool
	Version  bool
	ImageDir string
}

CLIFlags holds the values that are defined at rumtime by the user.

For example, `fsm --json pipeline.yml`.

var Flags CLIFlags

Jump to

Keyboard shortcuts

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