mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-27 11:11:07 +08:00
【升级go 1.18】
This commit is contained in:
@@ -4601,11 +4601,11 @@ func (s *s) ReadDoc() string {
|
||||
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
||||
|
||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||
"marshal": func(v interface{}) string {
|
||||
"marshal": func(v any) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
},
|
||||
"escape": func(v interface{}) string {
|
||||
"escape": func(v any) string {
|
||||
// escape tabs
|
||||
str := strings.Replace(v.(string), "\t", "\\t", -1)
|
||||
// replace " with \", and if that results in \\", replace that with \\\"
|
||||
|
||||
Reference in New Issue
Block a user