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)
| 1135 | // It returns an indication of whether any comments were printed. |
| 1136 | // See descriptor.proto for its format. |
| 1137 | func (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 |
| 1149 | func (g *Generator) makeComments(path string) (string, bool) { |
no test coverage detected