exec

package
v0.0.0-...-bd9c4bf Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exec

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

Exec disk implementation.

func New

func New(
	logger *slog.Logger,
) *Exec

New factory to create a new Exec instance.

func (*Exec) RunCmd

func (e *Exec) RunCmd(
	name string,
	args []string,
) (string, error)

RunCmd executes the provided command with arguments, using the current working directory.

func (*Exec) RunCmdImpl

func (e *Exec) RunCmdImpl(
	name string,
	args []string,
	cwd string,
) (string, error)

RunCmdImpl executes the provided command with the specified arguments and an optional working directory. It captures and logs the combined output (stdout and stderr) of the command.

func (*Exec) RunCmdInDir

func (e *Exec) RunCmdInDir(
	name string,
	args []string,
	cwd string,
) (string, error)

RunCmdInDir executes the provided command with arguments, using the current provided directory.

type Manager

type Manager interface {
	// RunCmd executes the provided command with arguments, using the current
	// working directory.
	RunCmd(name string, args []string) (string, error)
}

Manager manager responsible for exec operations.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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