From 56f806a1f5db97efc6d4ddfbe0af62c133f07b68 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 19 Jun 2023 00:25:39 -0400 Subject: [PATCH] No more contextless error returns --- cmd/obp/cmd/validate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/obp/cmd/validate.go b/cmd/obp/cmd/validate.go index 356638a..d972e36 100644 --- a/cmd/obp/cmd/validate.go +++ b/cmd/obp/cmd/validate.go @@ -34,7 +34,7 @@ var validateCmd = &cobra.Command{ err := fs.WalkDir(root, ".", func(path string, d fs.DirEntry, err error) error { if err != nil { - return err + return fmt.Errorf("could not walk %q: %w", path, err) } if d.IsDir() { @@ -61,7 +61,7 @@ var validateCmd = &cobra.Command{ return nil }) - return err + return fmt.Errorf("validate command failed: %w", err) }, }