1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

fix the rename in beego

This commit is contained in:
astaxie 2016-01-15 14:45:56 +08:00
parent eb99d12c83
commit 0acdf2e816
2 changed files with 9 additions and 8 deletions

3
fix.go
View File

@ -82,7 +82,7 @@ var rules = []string{
"beego.FlashName", "beego.BConfig.WebConfig.FlashName", "beego.FlashName", "beego.BConfig.WebConfig.FlashName",
"beego.FlashSeperator", "beego.BConfig.WebConfig.FlashSeparator", "beego.FlashSeperator", "beego.BConfig.WebConfig.FlashSeparator",
"beego.EnableDocs", "beego.BConfig.WebConfig.EnableDocs", "beego.EnableDocs", "beego.BConfig.WebConfig.EnableDocs",
"beego.XSRFKEY", "beego.BConfig.WebConfig.XSRFKEY", "beego.XSRFKEY", "beego.BConfig.WebConfig.XSRFKey",
"beego.EnableXSRF", "beego.BConfig.WebConfig.EnableXSRF", "beego.EnableXSRF", "beego.BConfig.WebConfig.EnableXSRF",
"beego.XSRFExpire", "beego.BConfig.WebConfig.XSRFExpire", "beego.XSRFExpire", "beego.BConfig.WebConfig.XSRFExpire",
"beego.TemplateLeft", "beego.BConfig.WebConfig.TemplateLeft", "beego.TemplateLeft", "beego.BConfig.WebConfig.TemplateLeft",
@ -121,6 +121,7 @@ var rules = []string{
"swagger.ApiDeclaration", "swagger.APIDeclaration", "swagger.ApiDeclaration", "swagger.APIDeclaration",
"swagger.Api", "swagger.API", "swagger.Api", "swagger.API",
"swagger.ApiRef", "swagger.APIRef", "swagger.ApiRef", "swagger.APIRef",
"swagger.Infomation", "swagger.Information",
"toolbox.UrlMap", "toolbox.URLMap", "toolbox.UrlMap", "toolbox.URLMap",
"logs.LoggerInterface", "logs.Logger", "logs.LoggerInterface", "logs.Logger",
"Input.Request", "Input.Context.Request", "Input.Request", "Input.Context.Request",

View File

@ -126,7 +126,7 @@ func generateDocs(curpath string) {
os.Exit(2) os.Exit(2)
} }
rootapi.Infos = swagger.Infomation{} rootapi.Info = swagger.Information{}
rootapi.SwaggerVersion = swagger.SwaggerVersion rootapi.SwaggerVersion = swagger.SwaggerVersion
//analysis API comments //analysis API comments
if f.Comments != nil { if f.Comments != nil {
@ -135,17 +135,17 @@ func generateDocs(curpath string) {
if strings.HasPrefix(s, "@APIVersion") { if strings.HasPrefix(s, "@APIVersion") {
rootapi.APIVersion = strings.TrimSpace(s[len("@APIVersion"):]) rootapi.APIVersion = strings.TrimSpace(s[len("@APIVersion"):])
} else if strings.HasPrefix(s, "@Title") { } else if strings.HasPrefix(s, "@Title") {
rootapi.Infos.Title = strings.TrimSpace(s[len("@Title"):]) rootapi.Info.Title = strings.TrimSpace(s[len("@Title"):])
} else if strings.HasPrefix(s, "@Description") { } else if strings.HasPrefix(s, "@Description") {
rootapi.Infos.Description = strings.TrimSpace(s[len("@Description"):]) rootapi.Info.Description = strings.TrimSpace(s[len("@Description"):])
} else if strings.HasPrefix(s, "@TermsOfServiceUrl") { } else if strings.HasPrefix(s, "@TermsOfServiceUrl") {
rootapi.Infos.TermsOfServiceURL = strings.TrimSpace(s[len("@TermsOfServiceUrl"):]) rootapi.Info.TermsOfServiceURL = strings.TrimSpace(s[len("@TermsOfServiceUrl"):])
} else if strings.HasPrefix(s, "@Contact") { } else if strings.HasPrefix(s, "@Contact") {
rootapi.Infos.Contact = strings.TrimSpace(s[len("@Contact"):]) rootapi.Info.Contact = strings.TrimSpace(s[len("@Contact"):])
} else if strings.HasPrefix(s, "@License") { } else if strings.HasPrefix(s, "@License") {
rootapi.Infos.License = strings.TrimSpace(s[len("@License"):]) rootapi.Info.License = strings.TrimSpace(s[len("@License"):])
} else if strings.HasPrefix(s, "@LicenseUrl") { } else if strings.HasPrefix(s, "@LicenseUrl") {
rootapi.Infos.LicenseURL = strings.TrimSpace(s[len("@LicenseUrl"):]) rootapi.Info.LicenseURL = strings.TrimSpace(s[len("@LicenseUrl"):])
} }
} }
} }