From 63b5a81104944d7ad0a4840907f9e8757a20bcfd Mon Sep 17 00:00:00 2001 From: hcrgm Date: Mon, 14 Nov 2016 19:07:22 +0800 Subject: [PATCH] Update g_docs.go --- g_docs.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/g_docs.go b/g_docs.go index f3ddc16..07f432f 100644 --- a/g_docs.go +++ b/g_docs.go @@ -145,17 +145,17 @@ func generateDocs(curpath string) { rootapi.Infos.Contact.Name = strings.TrimSpace(s[len("@Name"):]) } else if strings.HasPrefix(s, "@URL") { rootapi.Infos.Contact.URL = strings.TrimSpace(s[len("@URL"):]) - } else if strings.HasPrefix(s, "@License") { - if rootapi.Infos.License == nil { - rootapi.Infos.License = &swagger.License{Name: strings.TrimSpace(s[len("@License"):])} - } else { - rootapi.Infos.License.Name = strings.TrimSpace(s[len("@License"):]) - } } else if strings.HasPrefix(s, "@LicenseUrl") { if rootapi.Infos.License == nil { - rootapi.Infos.License = &swagger.License{URL: strings.TrimSpace(s[len("@LicenseUrl"):])} + rootapi.Infos.License = &swagger.License{URL: strings.TrimSpace(s[len("@LicenseUrl"):])} } else { - rootapi.Infos.License.URL = strings.TrimSpace(s[len("@LicenseUrl"):]) + rootapi.Infos.License.URL = strings.TrimSpace(s[len("@LicenseUrl"):]) + } + } else if strings.HasPrefix(s, "@License") { + if rootapi.Infos.License == nil { + rootapi.Infos.License = &swagger.License{Name: strings.TrimSpace(s[len("@License"):])} + } else { + rootapi.Infos.License.Name = strings.TrimSpace(s[len("@License"):]) } } else if strings.HasPrefix(s, "@Schemes") { rootapi.Schemes = strings.Split(strings.TrimSpace(s[len("@Schemes"):]), ",")