1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:54:39 -07:00
This commit is contained in:
Jes Cok 2023-08-05 04:45:15 +08:00
parent b5ac116228
commit 59c5d7ea76

View File

@ -124,13 +124,13 @@ func MustHaveGoBuild(t testing.TB) {
}
}
// HasGoRun reports whether the current system can run programs with “go run .”
// HasGoRun reports whether the current system can run programs with “go run”.
func HasGoRun() bool {
// For now, having go run and having go build are the same.
return HasGoBuild()
}
// MustHaveGoRun checks that the current system can run programs with “go run .”
// MustHaveGoRun checks that the current system can run programs with “go run”.
// If not, MustHaveGoRun calls t.Skip with an explanation.
func MustHaveGoRun(t testing.TB) {
if !HasGoRun() {