cmd

package
v2.1.22 Latest Latest
Warning

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

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

Documentation

Overview

Package cmd contains utilities to execute commands using a test-friendly interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Exec(...string) ([]byte, error)
}

Command execs a command with the given arguments.

type RealImpl

type RealImpl struct {
	// The command to execute.
	Command string
}

RealImpl is a real implementation of Command which uses exec.Command to execute the given cmd.

func (*RealImpl) Exec

func (s *RealImpl) Exec(args ...string) ([]byte, error)

Exec executes the defined command with the given args, returning the results of stdout, or an error.

Jump to

Keyboard shortcuts

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