From 3b3067d390c1083405667453fda7bfa21c0db4e3 Mon Sep 17 00:00:00 2001 From: ElvinChan Date: Fri, 2 Nov 2018 22:57:38 +0800 Subject: [PATCH] #13 Fix bug of tag format in doc --- README.md | 4 ++-- README_zh-CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 75ca2e6..cef4749 100644 --- a/README.md +++ b/README.md @@ -132,14 +132,14 @@ The methods which name's suffix are `Nested` means these methods treat parameter e.g. ``` type SearchInput struct { - Q string `query:"q" swagger:"desc("Keywords"),required"` + Q string `query:"q" swagger:"desc(Keywords),required"` SkipCount int `query:"skipCount"` } a.AddParamQueryNested(SearchInput{}) ``` Is equivalent to: ``` -a.AddParamQuery("", "q", "", true). +a.AddParamQuery("", "q", "Keywords", true). AddParamQuery(0, "skipCount", "", false) ``` - Add responses. diff --git a/README_zh-CN.md b/README_zh-CN.md index 15ff562..4d49317 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -132,14 +132,14 @@ AddParamFile(name, desc string, required bool) 例: ``` type SearchInput struct { - Q string `query:"q" swagger:"desc("Keywords"),required"` + Q string `query:"q" swagger:"desc(Keywords),required"` SkipCount int `query:"skipCount"` } a.AddParamQueryNested(SearchInput{}) ``` 等价于: ``` -a.AddParamQuery("", "q", "", true). +a.AddParamQuery("", "q", "Keywords", true). AddParamQuery(0, "skipCount", "", false) ``` - 添加响应。