From 9f84df7f0179d74fca6f05cd88639d9237af7093 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 6 Sep 2023 11:31:58 +0200 Subject: [PATCH] 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 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- src/cmd/go/go_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 1c4374da4b..1e28bec92d 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -791,19 +791,6 @@ func (tg *testgoData) mustNotExist(path string) { } } -// mustHaveContent succeeds if filePath is a path to a file, -// and that file is readable and not empty. -func (tg *testgoData) mustHaveContent(filePath string) { - tg.mustExist(filePath) - f, err := os.Stat(filePath) - if err != nil { - tg.t.Fatal(err) - } - if f.Size() == 0 { - tg.t.Fatalf("expected %s to have data, but is empty", filePath) - } -} - // wantExecutable fails with msg if path is not executable. func (tg *testgoData) wantExecutable(path, msg string) { tg.t.Helper() -- 2.44.0