mirror of
https://github.com/containers/skopeo.git
synced 2025-09-07 09:40:55 +00:00
Use io.WriteString
... mostly so that I get practice and remember this exists in the future. (This saves one allocation & copy when the target implements io.StringWriter. And that makes absolutely no relevant difference on this path.) Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -99,7 +99,7 @@ func runExecCmdWithInput(t *testing.T, cmd *exec.Cmd, input string) {
|
||||
require.NoError(t, err)
|
||||
err = cmd.Start()
|
||||
require.NoError(t, err)
|
||||
_, err = stdin.Write([]byte(input))
|
||||
_, err = io.WriteString(stdin, input)
|
||||
require.NoError(t, err)
|
||||
err = stdin.Close()
|
||||
require.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user