all: adopt strings, errors, and os helpers

This commit is contained in:
Kristoffer Dalby committed 2026-06-17 16:12:19 +02:00
1 parent 27468f944b
commit 4f4e95fc80
7 files changed
+19 -44

No files matched your search

+3 -4
View File
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"log"
"os"
"os/exec"
"strings"
@@ -283,7 +284,7 @@ func checkGitRepository(ctx context.Context) DoctorResult {
}
// checkRequiredFiles verifies required files exist.
func checkRequiredFiles(ctx context.Context) DoctorResult {
func checkRequiredFiles(_ context.Context) DoctorResult {
requiredFiles := []string{
"go.mod",
"integration/",
@@ -293,9 +294,7 @@ func checkRequiredFiles(ctx context.Context) DoctorResult {
var missingFiles []string
for _, file := range requiredFiles {
cmd := exec.CommandContext(ctx, "test", "-e", file)
err := cmd.Run()
_, err := os.Stat(file)
if err != nil {
missingFiles = append(missingFiles, file)
}