Documentation ¶
Index ¶
- func CracklibCheck(texttoinpsect string, stringtype string) (bool, string)
- func PipeRunAndLog(in string, args ...string) error
- func PipeRunAndPipeOut(in string, out *bytes.Buffer, args ...string) error
- func Run(writer io.Writer, args ...string) error
- func RunAndLog(args ...string) error
- func RunAndLogWithEnv(env map[string]string, args ...string) error
- func RunAndProcessOutput(printPrefix string, output Output, args ...string) error
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CracklibCheck ¶
CracklibCheck runs the cracklib-check executable piping password to stdin of cmd and writing stdoutput to byte buffer stringtype is used to inform kind of information we are checking: password or passphrase
func PipeRunAndLog ¶
PipeRunAndLog is similar to RunAndLog runs a command and writes the output to default logger and also writes in to the process stdin
func PipeRunAndPipeOut ¶
PipeRunAndPipeOut is similar to PipeRunAndLog but runs a command by feeding a string to stdin of Cmd and output is written to a byte buffer instead of a log
func Run ¶
Run executes a command and uses writer to write both stdout and stderr args are the actual command and its arguments
func RunAndLog ¶
RunAndLog executes a command (similar to Run) but takes care of writing the output to default logger
func RunAndLogWithEnv ¶
RunAndLogWithEnv does the same as RunAndLog but it changes the execution's environment variables adding the provided ones by the env argument