go-zero/tools/goctl/rpc/parser/comment.go
Keson 856b5aadb1
rpc generation fix (#184)
* reactor alert

* optimize

* add test case

* update the target directory in case proto contains option

* fix missing comments and format code
2020-11-05 19:08:34 +08:00

11 lines
173 B
Go

package parser
import "github.com/emicklei/proto"
func GetComment(comment *proto.Comment) string {
if comment == nil {
return ""
}
return "// " + comment.Message()
}