cli

package
v0.0.0-...-afd2ce5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExitCodeOK is no error status
	ExitCodeOK = 0

	// ExitCodeError is error status
	ExitCodeError = 1
)
View Source
const CalciumFile = "calcium.yml"

CalciumFile is file name

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	In, Out, Err io.Writer
	Args         []string
	Yaml
}

CLI for commad

func (*CLI) Read

func (c *CLI) Read() ([]byte, error)

Read return Yaml

func (*CLI) Routes

func (c *CLI) Routes() error

Routes is command routing

func (*CLI) Run

func (c *CLI) Run() error

Run execute shell script

func (*CLI) Usage

func (c *CLI) Usage() string

Usage give cli usage

type Yaml

type Yaml interface {
	Read() ([]byte, error)
}

Yaml behave yaml

type YamlFunc

type YamlFunc func() ([]byte, error)

YamlFunc implements Yaml interface

func (YamlFunc) Read

func (f YamlFunc) Read() ([]byte, error)

Read return yaml

Jump to

Keyboard shortcuts

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