Skip to content

Commit

Permalink
chore: adjust rpc comment format (zeromicro#2501)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenquan authored Oct 22, 2022
1 parent c92a2d1 commit 22bdf0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/goctl/rpc/parser/comment.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package parser

import "github.com/emicklei/proto"
import (
"strings"

"github.com/emicklei/proto"
)

// GetComment returns content with prefix //
func GetComment(comment *proto.Comment) string {
if comment == nil {
return ""
}
return "// " + comment.Message()
return "// " + strings.TrimSpace(comment.Message())
}

0 comments on commit 22bdf0b

Please sign in to comment.