cmdutil

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandRunner = func(cmd *exec.Cmd) error {
	return cmd.Run()
}

CommandRunner is for running the command

Functions

func Run

func Run(command string, args ...string) error

Run the command

func RunCommand

func RunCommand(cmd *exec.Cmd, silent bool) error

RunCommand run the command

func RunInDir

func RunInDir(dir, command string, args ...string) error

RunInDir runs the command in the specified directory

func RunInDirSilently

func RunInDirSilently(dir, command string, args ...string) error

RunInDirSilently run the command in the specified directory silently

func RunSilently

func RunSilently(command string, args ...string) error

RunSilently runs the command silently

Types

type RunError

type RunError struct {
	Command   *exec.Cmd
	ExecError error
}

RunError is the error type for cmdutil

func (*RunError) Error

func (e *RunError) Error() string

Error to implement error interface

type RunFunc

type RunFunc func(*exec.Cmd) error

RunFunc for the type command execution

Jump to

Keyboard shortcuts

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