cmdutils

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: AGPL-3.0 Imports: 9 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  uint64
	Handle null.Uint64
	Row    string
}

func LineSeeker

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

func RecvCmdOutputs

func RecvCmdOutputs(page, limit uint,
	cmdBin string, cmdArgs []string,
	parser func(uint64, string) (*RowInfo, error),
) (rows []RowInfo, hasMore bool, err error)

func (RowInfo) GetHandleID

func (r RowInfo) GetHandleID() uint64

func (RowInfo) HasHandleID

func (r RowInfo) HasHandleID() 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