From 8d0f7dbb274ebe29730f24cc2568cb9864069c1d Mon Sep 17 00:00:00 2001 From: kingxt Date: Thu, 24 Sep 2020 10:31:49 +0800 Subject: [PATCH] rename (#98) * 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 --- tools/goctl/api/parser/util.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/goctl/api/parser/util.go b/tools/goctl/api/parser/util.go index dc1f55e9..d03fb8c1 100644 --- a/tools/goctl/api/parser/util.go +++ b/tools/goctl/api/parser/util.go @@ -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 { @@ -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