Skip to content

Commit

Permalink
use trim spaced string (swaggo#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
pei0804 authored Mar 24, 2019
1 parent 3a5aa94 commit 4d66fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ func (operation *Operation) ParseComment(comment string, astFile *ast.File) erro
return err
}
case "@router":
if err := operation.ParseRouterComment(strings.TrimSpace(commentLine[len(attribute):])); err != nil {
if err := operation.ParseRouterComment(lineRemainder); err != nil {
return err
}
case "@security":
if err := operation.ParseSecurityComment(strings.TrimSpace(commentLine[len(attribute):])); err != nil {
if err := operation.ParseSecurityComment(lineRemainder); err != nil {
return err
}
}
Expand Down

0 comments on commit 4d66fe8

Please sign in to comment.