Skip to content

Commit 9f84df7

Browse files
committed
cmd/go: remove unused (*testgoData).mustHaveContent test helper
It's unused since CL 214382. Change-Id: I83a860938f87a7c4d2bdb966689c17ba29066639 Reviewed-on: https://go-review.googlesource.com/c/go/+/537596 Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 37788b8 commit 9f84df7

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/cmd/go/go_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -791,19 +791,6 @@ func (tg *testgoData) mustNotExist(path string) {
791791
}
792792
}
793793

794-
// mustHaveContent succeeds if filePath is a path to a file,
795-
// and that file is readable and not empty.
796-
func (tg *testgoData) mustHaveContent(filePath string) {
797-
tg.mustExist(filePath)
798-
f, err := os.Stat(filePath)
799-
if err != nil {
800-
tg.t.Fatal(err)
801-
}
802-
if f.Size() == 0 {
803-
tg.t.Fatalf("expected %s to have data, but is empty", filePath)
804-
}
805-
}
806-
807794
// wantExecutable fails with msg if path is not executable.
808795
func (tg *testgoData) wantExecutable(path, msg string) {
809796
tg.t.Helper()

0 commit comments

Comments
 (0)