mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-03 15:47:27 -04:00
Export WriteToStdin for use by clients
This commit is contained in:
@@ -56,8 +56,9 @@ func WriteEntry(targetLocation string, entryData []string, verifyEntryDoesNotExi
|
||||
}
|
||||
}
|
||||
|
||||
// writeToStdin is a utility function that writes a string to a command's stdin.
|
||||
func writeToStdin(cmd *exec.Cmd, input string) {
|
||||
// WriteToStdin is a utility function that writes a string to a command's stdin.
|
||||
// TODO unexport (import?) after migration off of GPG
|
||||
func WriteToStdin(cmd *exec.Cmd, input string) {
|
||||
stdin, err := cmd.StdinPipe()
|
||||
if err != nil {
|
||||
fmt.Println(AnsiError+"Failed to access stdin for system command:", err.Error()+AnsiReset)
|
||||
|
||||
Reference in New Issue
Block a user