exec

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2021 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.package exec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execer

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

func NewExecer

func NewExecer(stdout, stderr io.Writer) *Execer

func (*Execer) Exec

func (e *Execer) Exec(cmd string, args ...string) error

func (*Execer) SetStderr

func (e *Execer) SetStderr(stderr io.Writer)

func (*Execer) SetStdout

func (e *Execer) SetStdout(stdout io.Writer)

type FakeExecer

type FakeExecer struct {
	*Execer
	// contains filtered or unexported fields
}

func NewFakeExecer

func NewFakeExecer(errs ...error) *FakeExecer

func NewFakeExecerWithIO added in v0.1.6

func NewFakeExecerWithIO(stdout, stderr io.Writer, resp ...Response) *FakeExecer

func (*FakeExecer) Exec

func (f *FakeExecer) Exec(cmd string, _ ...string) error

type Response added in v0.1.6

type Response struct {
	Err    error
	Stdout string
	Stderr string
}

Jump to

Keyboard shortcuts

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