cmdutils

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCmdForcedExit = errors.New(`cmd forced exit`)

Functions

func RunCmd

func RunCmd(ctx context.Context, path string, args []string, stdout io.Writer, stdin ...io.Reader) error

func RunCmdWithCallback

func RunCmdWithCallback(ctx context.Context, path string, args []string, cb func(*exec.Cmd) error) error

Types

type RowInfo

type RowInfo struct {
	RowNo  uint
	Handle null.Uint
	Row    string
}

func LineSeeker

func LineSeeker(r io.Reader, startOffset, limit uint, parser func(uint, string) (RowInfo, error)) (rows []RowInfo, hasMore bool, index uint, err error)

func RecvCmdOutputs

func RecvCmdOutputs(startOffset, limit uint,
	cmdBin string, cmdArgs []string,
	parser func(uint, string) (RowInfo, error),
) (rows []RowInfo, hasMore bool, offset uint, err error)

func (RowInfo) GetHandleID

func (r RowInfo) GetHandleID() uint

func (RowInfo) HasHandleID

func (r RowInfo) HasHandleID() bool

func (RowInfo) IsZero added in v1.3.5

func (r RowInfo) IsZero() bool

func (RowInfo) String

func (r RowInfo) String() string

Jump to

Keyboard shortcuts

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