* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* update doc

* remove update

* remove no need

* remove no need

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl support import

* goctl support import

* rename

Co-authored-by: kingxt <dream4kingxt@163.com>
master
kingxt 4 years ago committed by GitHub
parent a5ce2c448e
commit 8d0f7dbb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,12 +75,12 @@ func MatchStruct(api string) (*ApiStruct, error) {
var parseInfo = false var parseInfo = false
var parseImport = false var parseImport = false
var parseType = false var parseType = false
var parseSevice = false var parseService = false
var segment string var segment string
for scanner.Scan() { for scanner.Scan() {
line := strings.TrimSpace(scanner.Text()) line := strings.TrimSpace(scanner.Text())
if line == "@doc(" { if line == "info(" {
parseInfo = true parseInfo = true
} }
if line == ")" && parseInfo { if line == ")" && parseInfo {
@ -111,12 +111,12 @@ func MatchStruct(api string) (*ApiStruct, error) {
segment = line + "\n" segment = line + "\n"
continue continue
} }
parseSevice = true parseService = true
} }
segment += scanner.Text() + "\n" segment += scanner.Text() + "\n"
} }
if !parseSevice { if !parseService {
return nil, errors.New("no service defined") return nil, errors.New("no service defined")
} }
result.Service = segment result.Service = segment

Loading…
Cancel
Save