fix: handle swag.ReadDoc two-value return
Some checks failed
CI / Build & Test (push) Failing after 29s
Some checks failed
CI / Build & Test (push) Failing after 29s
This commit is contained in:
parent
f44fcbafa7
commit
485ae9b329
@ -28,7 +28,7 @@ func SwaggerHandler() gin.HandlerFunc {
|
|||||||
isDocJSON := strings.HasSuffix(relPath, "doc.json")
|
isDocJSON := strings.HasSuffix(relPath, "doc.json")
|
||||||
|
|
||||||
if isDocJSON {
|
if isDocJSON {
|
||||||
doc := swag.ReadDoc()
|
doc, _ := swag.ReadDoc()
|
||||||
c.Header("Content-Type", "application/json; charset=utf-8")
|
c.Header("Content-Type", "application/json; charset=utf-8")
|
||||||
c.Writer.WriteHeader(200)
|
c.Writer.WriteHeader(200)
|
||||||
c.Writer.Write([]byte(doc))
|
c.Writer.Write([]byte(doc))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user