// 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/swaggo/swag" ) var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "termsOfService": "https://www.hzinsights.com/", "contact": { "name": "www.hzinsights.com/", "url": "https://www.hzinsights.com/", "email": "pyan@hzinsights.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": {} }` type swaggerInfo struct { Version string Host string BasePath string Schemes []string Title string Description string } // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = swaggerInfo{ Version: "1.0", Host: "127.0.0.1:8607", BasePath: "/", Schemes: []string{}, Title: "弘则人力资源管理系统API接口文档", Description: "弘则人力资源管理系统API接口文档", } type s struct{} func (s *s) ReadDoc() string { sInfo := SwaggerInfo sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) t, err := template.New("swagger_info").Funcs(template.FuncMap{ "marshal": func(v interface{}) 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 } var tpl bytes.Buffer if err := t.Execute(&tpl, sInfo); err != nil { return doc } return tpl.String() } func init() { swag.Register("swagger", &s{}) }