Code optimized (#523)

* optimized markdown generator

* optimized markdown generator

* optimized markdown generator

* add more comment

* add comment

* add comment

* add comments for rpc tool

* add comments for model tool

* add comments for model tool

* add comments for model tool

* add comments for config tool

* add comments for config tool

* add comments

* add comments

* add comments

* add comments

* add comment

* remove rpc main head info

* add comment

* optimized

Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
kingxt
2021-02-26 16:11:47 +08:00
committed by GitHub
parent ef146cf5ba
commit e6ef1fca12
104 changed files with 651 additions and 375 deletions

View File

@@ -4931,7 +4931,7 @@ func (p *ApiParserParser) Route() (localctx IRouteContext) {
}()
p.EnterOuterAlt(localctx, 1)
checkHttpMethod(p)
checkHTTPMethod(p)
{
p.SetState(291)

View File

@@ -74,7 +74,7 @@ func checkKeyValue(p *ApiParserParser) {
setCurrentTokenText(p, v)
}
func checkHttpMethod(p *ApiParserParser) {
func checkHTTPMethod(p *ApiParserParser) {
method := getCurrentTokenText(p)
uppler := strings.ToUpper(method)
switch uppler {
@@ -107,11 +107,13 @@ func checkKey(p *ApiParserParser) {
}
}
// IsBasicType returns true if the input argument is basic golang type
func IsBasicType(text string) bool {
_, ok := kind[text]
return ok
}
// IsGolangKeyWord returns true if input argument is golang keyword, but it will be ignored which in excepts
func IsGolangKeyWord(text string, excepts ...string) bool {
for _, each := range excepts {
if text == each {
@@ -171,6 +173,7 @@ func isNormal(p *ApiParserParser) bool {
return len(list) > 1
}
// MatchTag returns a Boolean value, which returns true if it does matched, otherwise returns fase
func MatchTag(v string) bool {
return matchRegex(v, tagRegex)
}