Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input interface { /* SendTo sends the input data held by this object to the given command. This may involve either adding arguments or redirecting stdin, as well as file IO. tempDir is a path to a temporary directory that may be used by the strategy to write intermediate files. It is the caller's responsibility to clean up the directory when the parser has been run. */ SendTo(cmd *exec.Cmd, argHandler InputArgHandler, tempDir string) error }
Input allows different ways of passing input to an external command, for example a list of files or a raw string. Each instance represents specific input data.
func MultipleFileInput ¶
func SingleFileInput ¶
func StringInput ¶
type InputArgHandler ¶
type InputArgHandler interface { // ReadStdinArg returns the command line arguments which // specify that the command should read input from stdin ReadStdinArg() []string // SingleFileArg returns the command line arguments which // specify the path to a single input file for the command. SingleFileArg(filePath string) []string // FileListArg returns the command line arguments which // specify the path to a file that contains a list of // files that should be processed by the command FileListArg(fileListPath string) []string }
InputArgHandler abstracts command-specific behaviour for how to pass files as command line arguments, including which option strings to use.
Click to show internal directories.
Click to hide internal directories.