Skip to content

Commit

Permalink
refactor: panic if error exists (swaggo#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
easonlin404 authored Feb 22, 2019
1 parent 0c6fcfd commit ea4ea9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ func WrapHandler(h *webdav.Handler) gin.HandlerFunc {
}
index.Execute(c.Writer, s)
case "doc.json":
doc, _ := swag.ReadDoc()
doc, err := swag.ReadDoc()
if err != nil {
panic(err)
}
c.Writer.Write([]byte(doc))
return
default:
Expand Down

0 comments on commit ea4ea9d

Please sign in to comment.