Skip to content

Commit 94616da

Browse files
prattmicgopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Michael Pratt <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 6785154 commit 94616da

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/internal/runtime/cgroup/line_reader_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package cgroup_test
66

77
import (
88
"internal/runtime/cgroup"
9-
"io"
109
"strings"
1110
"testing"
1211
)
@@ -122,18 +121,6 @@ var readerTests = []struct {
122121
},
123122
}
124123

125-
func readString(contents string) func(fd int, b []byte) (int, uintptr) {
126-
r := strings.NewReader(contents)
127-
return func(fd int, b []byte) (int, uintptr) {
128-
n, err := r.Read(b)
129-
if err != nil && err != io.EOF {
130-
const dummyErrno = 42
131-
return n, dummyErrno
132-
}
133-
return n, 0
134-
}
135-
}
136-
137124
func TestLineReader(t *testing.T) {
138125
for _, tc := range readerTests {
139126
t.Run(tc.name, func(t *testing.T) {

0 commit comments

Comments
 (0)