MCPcopy
hub / github.com/golang/protobuf / generateInitFunction

Method generateInitFunction

protoc-gen-go/generator/generator.go:2566–2576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2564}
2565
2566func (g *Generator) generateInitFunction() {
2567 if len(g.init) == 0 {
2568 return
2569 }
2570 g.P("func init() {")
2571 for _, l := range g.init {
2572 g.P(l)
2573 }
2574 g.P("}")
2575 g.init = nil
2576}
2577
2578func (g *Generator) generateFileDescriptor(file *FileDescriptor) {
2579 // Make a copy and trim source_code_info data.

Callers 1

generateMethod · 0.95

Calls 1

PMethod · 0.95

Tested by

no test coverage detected