From 94616dad425959b92d50498e1a18e47e5e6c8709 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 1 Dec 2025 16:00:01 -0500 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov Auto-Submit: Michael Pratt Reviewed-by: Michael Knyszek --- src/internal/runtime/cgroup/line_reader_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/internal/runtime/cgroup/line_reader_test.go b/src/internal/runtime/cgroup/line_reader_test.go index 6095dd0481..fb790b1e45 100644 --- a/src/internal/runtime/cgroup/line_reader_test.go +++ b/src/internal/runtime/cgroup/line_reader_test.go @@ -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) { -- 2.52.0