mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
16 lines
254 B
Go
16 lines
254 B
Go
package parser
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/emicklei/proto"
|
|
)
|
|
|
|
// GetComment returns content with prefix //
|
|
func GetComment(comment *proto.Comment) string {
|
|
if comment == nil {
|
|
return ""
|
|
}
|
|
return "// " + strings.TrimSpace(comment.Message())
|
|
}
|