diff --git a/tools/goctl/rpc/parser/comment.go b/tools/goctl/rpc/parser/comment.go index e0e72be6..89f7ed7d 100644 --- a/tools/goctl/rpc/parser/comment.go +++ b/tools/goctl/rpc/parser/comment.go @@ -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()) }