mirror of
https://github.com/moby/moby.git
synced 2026-08-09 01:21:37 +00:00
integration-cli: avoid allocations with (*os.File).WriteString (mirror)
integration-cli/docker_cli_attach_unix_test.go:107:3: avoid allocations with (*os.File).WriteString (mirror)
cpty.Write([]byte("\n"))
^
integration-cli/docker_cli_attach_unix_test.go:144:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = cpty.Write([]byte("hello\n"))
^
integration-cli/docker_cli_exec_test.go:422:16: avoid allocations with (*os.File).WriteString (mirror)
if _, err := f.Write([]byte("success2\n")); err != nil {
^
integration-cli/docker_cli_exec_unix_test.go:57:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = p.Write([]byte("cat /foo && exit\n"))
^
integration-cli/docker_cli_run_test.go:4092:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := tmpFile.Write([]byte(data)); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:110:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = cpty.Write([]byte("hello\n"))
^
integration-cli/docker_cli_run_unix_test.go:169:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := cpty.Write([]byte("hello\n")); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:283:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := cpty.Write([]byte("hello\n")); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:364:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := cpty.Write([]byte("hello\n")); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:438:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := cpty.Write([]byte("\n")); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:880:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := tmpFile.Write([]byte(jsonData)); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:915:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := tmpFile.Write([]byte(jsonData)); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:952:15: avoid allocations with (*os.File).WriteString (mirror)
if _, err := tmpFile.Write([]byte(jsonData)); err != nil {
^
integration-cli/docker_cli_run_unix_test.go:1418:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = tmpFile.Write([]byte(jsonData))
^
integration-cli/docker_cli_run_unix_test.go:1445:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = tmpFile.Write([]byte(jsonData))
^
integration-cli/docker_cli_run_unix_test.go:1483:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = tmpFile.Write([]byte(jsonData))
^
integration-cli/docker_cli_run_unix_test.go:1517:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = tmpFile.Write([]byte(jsonData))
^
integration-cli/docker_cli_update_unix_test.go:235:11: avoid allocations with (*os.File).WriteString (mirror)
_, err = cpty.Write([]byte("exit\n"))
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -4088,8 +4088,8 @@ func (s *DockerCLIRunSuite) TestRunDuplicateMount(c *testing.T) {
|
||||
assert.NilError(c, err)
|
||||
defer tmpFile.Close()
|
||||
|
||||
data := "touch-me-foo-bar\n"
|
||||
if _, err := tmpFile.Write([]byte(data)); err != nil {
|
||||
const data = "touch-me-foo-bar\n"
|
||||
if _, err := tmpFile.WriteString(data); err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user