app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package app implements the CLI functionality, the CLI defers execution to the exported methods in this package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Options *Options // All the CLI options
	// contains filtered or unexported fields
}

App represents the spok program.

func New

func New(stream iostream.IOStream) *App

New creates and returns a new App.

func (*App) Run

func (a *App) Run(tasks []string) error

Run is the entry point to the spok program, the only arguments spok accepts are names of tasks, all other logic is handled via flags.

type Options

type Options struct {
	Spokfile  string // The path to the spokfile (defaults to find, overridden by --spokfile)
	Variables bool   // The --vars flag
	Fmt       bool   // The --fmt flag
	Init      bool   // The --init flag
	Clean     bool   // The --clean flag
	Force     bool   // The --force flag
	Verbose   bool   // The --verbose flag
	Quiet     bool   // The --quiet flag
	JSON      bool   // The --json flag
	Show      bool   // The --show flag
}

Options holds all the flag options for spok, these will be at their zero values if the flags were not set and the value of the flag otherwise.

Jump to

Keyboard shortcuts

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