diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2017-04-25 10:58:12 +0100 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2017-04-25 14:38:10 +0000 |
| commit | 516e6f6d5d83dc3dcee6403fab25d5954bbf3f62 (patch) | |
| tree | bee22fb6cea3296534ef24aafde3edbaec50d93e /src/net/http | |
| parent | 11c7b4491bd2cd1deb7b50433f431be9ced330db (diff) | |
| download | go-516e6f6d5d83dc3dcee6403fab25d5954bbf3f62.tar.xz | |
all: remove some unused parameters in test code
Mostly unnecessary *testing.T arguments.
Found with github.com/mvdan/unparam.
Change-Id: Ifb955cb88f2ce8784ee4172f4f94d860fa36ae9a
Reviewed-on: https://go-review.googlesource.com/41691
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/cgi/host_test.go | 2 | ||||
| -rw-r--r-- | src/net/http/cgi/plan9_test.go | 2 | ||||
| -rw-r--r-- | src/net/http/cgi/posix_test.go | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/net/http/cgi/host_test.go b/src/net/http/cgi/host_test.go index 11213349a7..15c169dbc1 100644 --- a/src/net/http/cgi/host_test.go +++ b/src/net/http/cgi/host_test.go @@ -409,7 +409,7 @@ func TestCopyError(t *testing.T) { } childRunning := func() bool { - return isProcessRunning(t, pid) + return isProcessRunning(pid) } if !childRunning() { diff --git a/src/net/http/cgi/plan9_test.go b/src/net/http/cgi/plan9_test.go index c8235831b0..2c29ef8025 100644 --- a/src/net/http/cgi/plan9_test.go +++ b/src/net/http/cgi/plan9_test.go @@ -12,7 +12,7 @@ import ( "testing" ) -func isProcessRunning(t *testing.T, pid int) bool { +func isProcessRunning(pid int) bool { _, err := os.Stat("/proc/" + strconv.Itoa(pid)) return err == nil } diff --git a/src/net/http/cgi/posix_test.go b/src/net/http/cgi/posix_test.go index 5ff9e7d5eb..9396ce036a 100644 --- a/src/net/http/cgi/posix_test.go +++ b/src/net/http/cgi/posix_test.go @@ -9,10 +9,9 @@ package cgi import ( "os" "syscall" - "testing" ) -func isProcessRunning(t *testing.T, pid int) bool { +func isProcessRunning(pid int) bool { p, err := os.FindProcess(pid) if err != nil { return false |
