common

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryName string

BinaryName the binary name to use in help docs

View Source
var TopLevelCommand string

TopLevelCommand the top level command name

Functions

func DefaultCommandRunner

func DefaultCommandRunner(c *util.Command) (string, error)

DefaultCommandRunner default runner if none is set

func DryRunCommandRunner added in v0.0.21

func DryRunCommandRunner(c *util.Command) (string, error)

DryRunCommandRunner output the commands to be run

func GetIOFileHandles

func GetIOFileHandles(h *util.IOFileHandles) util.IOFileHandles

GetIOFileHandles lazily creates a file handles object if the input is nil

func SplitCommand

func SplitCommand(cmd *cobra.Command, _ interface{}) *cobra.Command

SplitCommand helper command to ignore the options object

Types

type CommandRunner

type CommandRunner func(*util.Command) (string, error)

CommandRunner represents a command runner so that it can be stubbed out for testing

Jump to

Keyboard shortcuts

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