types

package
v2.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Debug    bool
	Base     string
	Dir      string
	Options  []string
	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, args ...string) (string, error)

Exec Execute the Git command call.

type Executor

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

Executor The Git command call function.

type Option

type Option func(g *Cmd)

Option Command option.

Jump to

Keyboard shortcuts

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