]> Cypherpunks repositories - gostls13.git/commit
os/exec: make skipStdinCopyError a function instead of a variable
authorBryan C. Mills <bcmills@google.com>
Sat, 23 Apr 2022 02:00:16 +0000 (22:00 -0400)
committerBryan Mills <bcmills@google.com>
Tue, 26 Apr 2022 13:47:05 +0000 (13:47 +0000)
commitad5eaa8c4cd952df0d4894f11ee0158a9a33a0f3
tree5d03dab465bf4a313f4d007f01f0644bb6bb2005
parent17d7983b29ba633708a9d7b18f90ab5bc029502d
os/exec: make skipStdinCopyError a function instead of a variable

This makes clearer that skipStdinCopyError is always defined and never
overridden in tests.

Secondarily, it may also help reduce init-time work and allow the
linker and/or inliner to better optimize this package.

(Noticed while prototyping #50436.)

Change-Id: I4f3c1bc146384a98136a4039f82165ed106c14b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/401897
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/os/exec/exec.go
src/os/exec/exec_plan9.go
src/os/exec/exec_unix.go
src/os/exec/exec_windows.go