MCPcopy
hub / github.com/hwholiday/learning_tools / PrintComments

Method PrintComments

grpc/protoc-gen-hw/generator/generator.go:1137–1146  ·  view source on GitHub ↗

PrintComments prints any comments from the source .proto file. The path is a comma-separated list of integers. It returns an indication of whether any comments were printed. See descriptor.proto for its format.

(path string)

Source from the content-addressed store, hash-verified

1135// It returns an indication of whether any comments were printed.
1136// See descriptor.proto for its format.
1137func (g *Generator) PrintComments(path string) bool {
1138 if !g.writeOutput {
1139 return false
1140 }
1141 if c, ok := g.makeComments(path); ok {
1142 g.P(c)
1143 return true
1144 }
1145 return false
1146}
1147
1148// makeComments generates the comment string for the field, no "\n" at the end
1149func (g *Generator) makeComments(path string) (string, bool) {

Callers 4

generateHeaderMethod · 0.95
generateEnumMethod · 0.95
generateMessageStructMethod · 0.95
generateServiceMethod · 0.80

Calls 2

makeCommentsMethod · 0.95
PMethod · 0.95

Tested by

no test coverage detected