exec

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exec contains helper abstractions for working with external commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Streaming

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

Streaming models a generic command execution that consumers can use to execute commands and stream their output to an io.Writer. For example compute commands can use this to standardize the flow control for each compiler toolchain.

func NewStreaming

func NewStreaming(cmd string, args, env []string, verbose bool, out io.Writer) *Streaming

NewStreaming constructs a new Streaming instance.

func (Streaming) Exec

func (s Streaming) Exec() error

Exec executes the compiler command and pipes the child process stdout and stderr output to the supplied io.Writer, it waits for the command to exit cleanly or returns an error.

Jump to

Keyboard shortcuts

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