types

package
v2.6.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFanOutPipe added in v2.6.3

func NewFanOutPipe(readerCount int) (io.Writer, []io.Reader)

NewFanOutPipe is a helper function to create a single writer with multiple readers.

Types

type Cmd

type Cmd struct {
	Debug         bool
	Base          string
	Options       []string
	StreamHandler StreamHandler
	Logger        logger
	Executor      Executor
}

Cmd Command.

func NewCmd

func NewCmd(name string) *Cmd

NewCmd Creates a new Cmd.

func (*Cmd) AddOptions

func (g *Cmd) AddOptions(option string)

AddOptions Add one command option.

func (*Cmd) ApplyOptions

func (g *Cmd) ApplyOptions(options ...Option)

ApplyOptions Apply command options.

func (*Cmd) Exec

func (g *Cmd) Exec(ctx context.Context, name string, debug bool, streamHandler StreamHandler, args ...string) (string, error)

Exec Execute the Git command call.

type Executor

type Executor func(ctx context.Context, name string, debug bool, streamHandler StreamHandler, args ...string) (string, error)

Executor The Git command call function.

type Option

type Option func(g *Cmd)

Option Command option.

type StreamHandler added in v2.6.3

type StreamHandler struct {
	Stdout io.Writer
	Stderr io.Writer
	Stdin  io.Reader
}

Jump to

Keyboard shortcuts

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