command

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package command defines variation points to allow alternate command runners.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	*exec.Cmd
	Run func() error
}

Cmd is an exec.Cmd with a configurable Run function.

func New

func New(c string, args ...string) *Cmd

New is the default factory that creates a Cmd with an os exec.Cmd Run function.

type ExecCommandFn added in v0.8.0

type ExecCommandFn func(string, ...string) *Cmd

ExecCommandFn defines a Cmd factory function. It takes the command to run as first parameter then its arguments as a slice.

Jump to

Keyboard shortcuts

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