exec

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 4 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(
	debug bool,
	logger *slog.Logger,
) *Exec

New factory to create a new Exec instance.

func (*Exec) RunCmd

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

RunCmd execute the provided command with args. Yeah, yeah, yeah, I know I cheated by using Exec in this package.

func (*Exec) RunCmdImpl added in v1.0.2

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

func (*Exec) RunCmdInDir added in v1.0.2

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

func (*Exec) RunInTempDir added in v1.0.2

func (e *Exec) RunInTempDir(dir, pattern string, fn func(string) error) error

RunInTempDir creates a temporary directory, and runs the provided function with the name of the directory as input. Then it cleans up the temporary directory.

Jump to

Keyboard shortcuts

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