cmd

package
v0.0.0-...-a16ed4d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cmd contains the source for the `astro` command line tool that operators use to interact with the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AstroCLI

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

AstroCLI is the main CLI program, where flags and state are stored for the running program.

func NewAstroCLI

func NewAstroCLI(opts ...Option) (*AstroCLI, error)

NewAstroCLI creates a new AstroCLI.

func (*AstroCLI) Run

func (cli *AstroCLI) Run(args []string) (exitCode int)

Run is the main entry point into the CLI program.

type Option

type Option func(*AstroCLI) error

Option is an option for the cli that allows for changing of options or dependency injection for testing.

func WithStderr

func WithStderr(stderr io.Writer) Option

WithStderr allows you to pass a custom stderr.

func WithStdin

func WithStdin(stdin io.Reader) Option

WithStdin allows you to pass a custom stdin.

func WithStdout

func WithStdout(stdout io.Writer) Option

WithStdout allows you to pass custom input.

Jump to

Keyboard shortcuts

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