add more test (#189)

* new test

* import bug when with quotation

* new test

* add test condition

* rpc template command use -o param

Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
kingxt
2020-11-07 17:13:40 +08:00
committed by GitHub
parent 7d7cb836af
commit 7f6eceb5a3
9 changed files with 144 additions and 51 deletions

View File

@@ -125,7 +125,7 @@ func ParseApi(api string) (*ApiStruct, error) {
}
func isImportBeginLine(line string) bool {
return strings.HasPrefix(line, "import") && strings.HasSuffix(line, ".api")
return strings.HasPrefix(line, "import") && (strings.HasSuffix(line, ".api") || strings.HasSuffix(line, `.api"`))
}
func isTypeBeginLine(line string) bool {