cmdtype

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: GPL-3.0 Imports: 4 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 []string

Cmd is specified by a slice of strings, avoiding ambiguous argument specifications

func ToCmd

func ToCmd(v any) (Cmd, error)

func ToCmds

func ToCmds(incmds any) ([]Cmd, error)

to cmds from any to []cmdtype.Cmd

func (Cmd) Run

func (cmd Cmd) Run(opts CmdRunOptions) error

Run runs a command

type CmdRunOptions

type CmdRunOptions struct {
	RedirectStdin  *os.File // default os.Stdin
	RedirectStdout *os.File // default os.Stdout
	RedirectStderr *os.File // default os.Stderr
	AppendedArgs   []string // useful for package install append package spec, []string{} or nil for none
	WorkingDir     string   // change working directory, "" for use default
	DoPCSubs       bool     // whether to do default PC subs
}

CmdRunOptions defines options for running a command

Jump to

Keyboard shortcuts

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