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)
| 1225 | // It returns an indication of whether any comments were printed. |
| 1226 | // See descriptor.proto for its format. |
| 1227 | func (g *Generator) PrintComments(path string) bool { |
| 1228 | if !g.writeOutput { |
| 1229 | return false |
| 1230 | } |
| 1231 | if c, ok := g.makeComments(path); ok { |
| 1232 | g.P(c) |
| 1233 | return true |
| 1234 | } |
| 1235 | return false |
| 1236 | } |
| 1237 | |
| 1238 | // makeComments generates the comment string for the field, no "\n" at the end |
| 1239 | func (g *Generator) makeComments(path string) (string, bool) { |
no test coverage detected