comment.go 218 B

1234567891011
  1. package parser
  2. import "github.com/emicklei/proto"
  3. // GetComment returns content with prefix //
  4. func GetComment(comment *proto.Comment) string {
  5. if comment == nil {
  6. return ""
  7. }
  8. return "// " + comment.Message()
  9. }