From 4b6de7acb82f2a0a9057e92f33de73e4235e4eab Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Mon, 13 Feb 2023 15:35:19 +0100 Subject: [PATCH] cmd/validate: more expressive errors Signed-off-by: Pierre Fenoll --- cmd/validate/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/validate/main.go b/cmd/validate/main.go index 9759564fa..d8c0fe6ad 100644 --- a/cmd/validate/main.go +++ b/cmd/validate/main.go @@ -59,7 +59,7 @@ func main() { doc, err := loader.LoadFromFile(filename) if err != nil { - log.Fatal(err) + log.Fatalln("Loading error:", err) } var opts []openapi3.ValidationOption @@ -74,7 +74,7 @@ func main() { } if err = doc.Validate(loader.Context, opts...); err != nil { - log.Fatal(err) + log.Fatalln("Validation error:", err) } case vd.Swagger == "2" || strings.HasPrefix(vd.Swagger, "2."): @@ -93,7 +93,7 @@ func main() { var doc openapi2.T if err := yaml.Unmarshal(data, &doc); err != nil { - log.Fatal(err) + log.Fatalln("Loading error:", err) } default: