chore: adjust rpc comment format (#2501)

master
chen quan 2 years ago committed by GitHub
parent c92a2d1b77
commit 22bdf0bbd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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())
}

Loading…
Cancel
Save