route support no request and response (#178)
* add more test and support no request and response * fix slash when run on windows * optimize test
This commit is contained in:
@@ -70,6 +70,12 @@ func (p *serviceEntityParser) parseLine(line string, api *spec.ApiSpec, annos []
|
||||
ch, _, err := reader.ReadRune()
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
if builder.Len() > 0 {
|
||||
token := strings.TrimSpace(builder.String())
|
||||
if len(token) > 0 && token != returnsTag {
|
||||
fields = append(fields, token)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user