Skip to content

Commit 01f8ed3

Browse files
authored
Merge pull request #6 from lev112/patch-1
panic on error
2 parents 15bc547 + 07252f3 commit 01f8ed3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func main() {
2424
// check if the input file exists
2525
if _, err := os.Stat(*input); os.IsNotExist(err) {
2626
fmt.Printf("Input file not found: %s\n", *input)
27-
return
27+
panic(err)
2828
}
2929

3030
// read the swagger file
@@ -37,7 +37,7 @@ func main() {
3737
swagger, err := openapi3.NewLoader().LoadFromData(swaggerData)
3838
if err != nil {
3939
fmt.Printf("Error parsing Swagger file: %v\n", err)
40-
return
40+
panic(err)
4141
}
4242

4343
// generate markdown

0 commit comments

Comments
 (0)