command

package
v0.2.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 11

Documentation

Overview

Package command provides support for addons to executing (CLI) commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Options Options
	Path    string
	Dir     string
	Output  []byte
}

Command execution.

func (*Command) Run

func (r *Command) Run() (err error)

Run executes the command. The command and output are both reported in task Report.Activity.

func (*Command) RunSilent

func (r *Command) RunSilent() (err error)

RunSilent executes the command. Nothing reported in task Report.Activity.

func (*Command) RunSilentWith

func (r *Command) RunSilentWith(ctx context.Context) (err error)

RunSilentWith executes the command with context. Nothing reported in task Report.Activity.

func (*Command) RunWith

func (r *Command) RunWith(ctx context.Context) (err error)

RunWith executes the command with context. The command and output are both reported in task Report.Activity.

type Options

type Options []string

Options are CLI options.

func (*Options) Add

func (a *Options) Add(option string, s ...string)

add

func (*Options) Addf

func (a *Options) Addf(option string, x ...interface{})

add

type SoftError

type SoftError = hub.SoftError

Jump to

Keyboard shortcuts

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