Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 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