1- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1+ // Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
22// This file was generated by swaggo/swag
3-
43package docs
54
65import (
76 "bytes"
87 "encoding/json"
98 "strings"
9+ "text/template"
1010
11- "github.com/alecthomas/template"
1211 "github.com/swaggo/swag"
1312)
1413
1514var doc = `{
1615 "schemes": {{ marshal .Schemes }},
1716 "swagger": "2.0",
1817 "info": {
19- "description": "{{.Description}}",
18+ "description": "{{escape .Description}}",
2019 "title": "{{.Title}}",
2120 "termsOfService": "http://swagger.io/terms/",
2221 "contact": {},
@@ -763,7 +762,7 @@ type swaggerInfo struct {
763762
764763// SwaggerInfo holds exported Swagger Info so clients can modify it
765764var SwaggerInfo = swaggerInfo {
766- Version : "1.1 .0" ,
765+ Version : "1.2 .0" ,
767766 Host : "" ,
768767 BasePath : "/" ,
769768 Schemes : []string {},
@@ -782,6 +781,13 @@ func (s *s) ReadDoc() string {
782781 a , _ := json .Marshal (v )
783782 return string (a )
784783 },
784+ "escape" : func (v interface {}) string {
785+ // escape tabs
786+ str := strings .Replace (v .(string ), "\t " , "\\ t" , - 1 )
787+ // replace " with \", and if that results in \\", replace that with \\\"
788+ str = strings .Replace (str , "\" " , "\\ \" " , - 1 )
789+ return strings .Replace (str , "\\ \\ \" " , "\\ \\ \\ \" " , - 1 )
790+ },
785791 }).Parse (doc )
786792 if err != nil {
787793 return doc
@@ -796,5 +802,5 @@ func (s *s) ReadDoc() string {
796802}
797803
798804func init () {
799- swag .Register (swag . Name , & s {})
805+ swag .Register ("swagger" , & s {})
800806}
0 commit comments