mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/runtime/cgroup: remove duplicate readString definition
Both CL 723241 and CL 723581 added identical definitions. Change-Id: I6a6a636c9e5f8c9080b9389ebf9d3f10305d79ac Reviewed-on: https://go-review.googlesource.com/c/go/+/725661 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
67851547d8
commit
94616dad42
1 changed files with 0 additions and 13 deletions
|
|
@ -6,7 +6,6 @@ package cgroup_test
|
|||
|
||||
import (
|
||||
"internal/runtime/cgroup"
|
||||
"io"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -122,18 +121,6 @@ var readerTests = []struct {
|
|||
},
|
||||
}
|
||||
|
||||
func readString(contents string) func(fd int, b []byte) (int, uintptr) {
|
||||
r := strings.NewReader(contents)
|
||||
return func(fd int, b []byte) (int, uintptr) {
|
||||
n, err := r.Read(b)
|
||||
if err != nil && err != io.EOF {
|
||||
const dummyErrno = 42
|
||||
return n, dummyErrno
|
||||
}
|
||||
return n, 0
|
||||
}
|
||||
}
|
||||
|
||||
func TestLineReader(t *testing.T) {
|
||||
for _, tc := range readerTests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue