Skip to content

Commit

Permalink
rename (zeromicro#98)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
kingxt and kingxt authored Sep 24, 2020
1 parent a5ce2c4 commit 8d0f7db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/goctl/api/parser/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ func MatchStruct(api string) (*ApiStruct, error) {
var parseInfo = false
var parseImport = false
var parseType = false
var parseSevice = false
var parseService = false
var segment string
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())

if line == "@doc(" {
if line == "info(" {
parseInfo = true
}
if line == ")" && parseInfo {
Expand Down Expand Up @@ -111,12 +111,12 @@ func MatchStruct(api string) (*ApiStruct, error) {
segment = line + "\n"
continue
}
parseSevice = true
parseService = true
}
segment += scanner.Text() + "\n"
}

if !parseSevice {
if !parseService {
return nil, errors.New("no service defined")
}
result.Service = segment
Expand Down

0 comments on commit 8d0f7db

Please sign in to comment.