From 63b600f0e52993bf56bceafbe79c0d1f50a75545 Mon Sep 17 00:00:00 2001 From: axiaoxin <254606826@qq.com> Date: Wed, 8 Sep 2021 14:46:57 +0800 Subject: [PATCH] bump verision to v1.2.22 --- routes/docs/docs.go | 14 ++++++++++---- statics/html/base.html | 2 +- version/version.go | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/routes/docs/docs.go b/routes/docs/docs.go index 7d95dbc..a081673 100644 --- a/routes/docs/docs.go +++ b/routes/docs/docs.go @@ -1,14 +1,13 @@ -// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag - package docs import ( "bytes" "encoding/json" "strings" + "text/template" - "github.com/alecthomas/template" "github.com/swaggo/swag" ) @@ -16,7 +15,7 @@ var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { - "description": "{{.Description}}", + "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" @@ -112,6 +111,13 @@ func (s *s) ReadDoc() string { a, _ := json.Marshal(v) return string(a) }, + "escape": func(v interface{}) string { + // escape tabs + str := strings.Replace(v.(string), "\t", "\\t", -1) + // replace " with \", and if that results in \\", replace that with \\\" + str = strings.Replace(str, "\"", "\\\"", -1) + return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1) + }, }).Parse(doc) if err != nil { return doc diff --git a/statics/html/base.html b/statics/html/base.html index 1b6eed1..19a971c 100644 --- a/statics/html/base.html +++ b/statics/html/base.html @@ -127,7 +127,7 @@
网站
- + diff --git a/version/version.go b/version/version.go index 1c3d985..db8849c 100644 --- a/version/version.go +++ b/version/version.go @@ -1,4 +1,4 @@ package version // Version 版本号 -const Version = "1.2.21" +const Version = "1.2.22"