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

Method addInitf

protoc-gen-go/generator/generator.go:1046–1048  ·  view source on GitHub ↗

addInitf stores the given statement to be printed inside the file's init function. The statement is given as a format specifier and arguments.

(stmt string, a ...interface{})

Source from the content-addressed store, hash-verified

1044// addInitf stores the given statement to be printed inside the file's init function.
1045// The statement is given as a format specifier and arguments.
1046func (g *Generator) addInitf(stmt string, a ...interface{}) {
1047 g.init = append(g.init, fmt.Sprintf(stmt, a...))
1048}
1049
1050// In Indents the output one tab stop.
1051func (g *Generator) In() { g.indent += "\t" }

Callers 3

generateMessageMethod · 0.95
generateExtensionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected