runner

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOk status = iota
	StatusErr
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor added in v1.1.0

type CommandExecutor struct{}

func (CommandExecutor) Execute added in v1.1.0

func (e CommandExecutor) Execute(root string, args []string) (*bytes.Buffer, error)

func (CommandExecutor) RawExecute added in v1.1.0

func (e CommandExecutor) RawExecute(command string, args ...string) error

type Executor added in v1.1.0

type Executor interface {
	Execute(root string, args []string) (*bytes.Buffer, error)
	RawExecute(command string, args ...string) error
}

Executor provides an interface for command execution. It is used here for testing purpose mostly.

type Result

type Result struct {
	Name   string
	Text   string
	Status status
}

type Runner

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

func NewRunner

func NewRunner(
	fs afero.Fs,
	repo *git.Repository,
	hook *config.Hook,
	args []string,
	resultChan chan Result,
	logSettings log.SkipSettings,
) *Runner

func (*Runner) RunAll

func (r *Runner) RunAll(hookName string, sourceDirs []string)

Jump to

Keyboard shortcuts

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