mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 11:01:18 +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:
parent
ad1b09dea4
commit
2a6a944c13
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user