exec

package
v0.0.0-...-e1fd696 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exec is used for executing commands

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(name string, arg ...string) *exec.Cmd

Command passes through to exec.Command for running generic commands

func ComposeCommand

func ComposeCommand(context ComposeCommandContext, command string, arg ...string) *exec.Cmd

ComposeCommand gets a docker-compose command to run

func RunCommand

func RunCommand(options HandlerOptions, cmd *exec.Cmd) error

RunCommand runs a command, handles verbose output and errors

func RunTTYCommand

func RunTTYCommand(options HandlerOptions, cmd *exec.Cmd)

RunTTYCommand runs a command in an interactive shell

Types

type ComposeCommandContext

type ComposeCommandContext struct {
	ProjectDirectory string
	ProjectName      string
	Files            []string
}

ComposeCommandContext ...

type HandlerOptions

type HandlerOptions struct {
	Spinner      *spinner.Spinner
	Verbosity    int
	HandleStdout func(stdout bytes.Buffer)
	HandleError  func(stderr bytes.Buffer, err error)
}

HandlerOptions options used when handeling executions

Jump to

Keyboard shortcuts

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