execv

package
v0.0.0-...-33a4ad3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package execv provides a wrapper around exec.Cmd for debugging purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachMod

func ForEachMod(rootDir string, fn func(dir string) error) error

ForEachMod runs the given function with the directory of every non-internal module.

Types

type CmdWrapper

type CmdWrapper struct {
	*exec.Cmd
}

CmdWrapper is a wrapper around exec.Cmd for debugging purposes.

func Command

func Command(name string, arg ...string) *CmdWrapper

Command wraps a exec.Command to add some logging about commands being run. The commands stdout/stderr default to os.Stdout/os.Stderr respectfully.

func (*CmdWrapper) Output

func (c *CmdWrapper) Output() ([]byte, error)

Output a command.

func (*CmdWrapper) Run

func (c *CmdWrapper) Run() error

Run a command.

Directories

Path Synopsis
Package gocmd provides helers for invoking Go tooling.
Package gocmd provides helers for invoking Go tooling.

Jump to

Keyboard shortcuts

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