cmdExec

package module
v0.0.0-...-ff4a37b Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: GPL-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(command string, args ...string) error

func Exec1

func Exec1(command string, args ...string) error

func Exec2

func Exec2(command string, args ...string) error

func Exec3

func Exec3(command string, args ...string) error

func ExecCapture

func ExecCapture(command string, args ...string) (string, error)

func FindRoot

func FindRoot(cmd *cobra.Command) *cobra.Command

func IsLastArg

func IsLastArg(args []string) bool

func PopArg

func PopArg(args []string) (string, []string)

func PopArgs

func PopArgs(cull int, args []string) ([]string, []string)

func ReparseArgs

func ReparseArgs(cmd *cobra.Command, args []string) (bool, error)

func ResetArgs

func ResetArgs(args ...string)

Types

type CapturingPassThroughWriter

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

CapturingPassThroughWriter is a writer that remembers data written to it and passes it to w

func NewCapturingPassThroughWriter

func NewCapturingPassThroughWriter(w io.Writer) *CapturingPassThroughWriter

NewCapturingPassThroughWriter creates new CapturingPassThroughWriter

func (*CapturingPassThroughWriter) Bytes

func (w *CapturingPassThroughWriter) Bytes() []byte

Bytes returns bytes written to the writer

func (*CapturingPassThroughWriter) Write

func (w *CapturingPassThroughWriter) Write(d []byte) (int, error)

Jump to

Keyboard shortcuts

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