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

Function Annotate

protoc-gen-go/generator/generator.go:970–972  ·  view source on GitHub ↗

Annotate records the file name and proto AST path of a list of atoms so that a later call to P can emit a link from each atom to its origin.

(file *FileDescriptor, path string, atoms ...interface{})

Source from the content-addressed store, hash-verified

968// Annotate records the file name and proto AST path of a list of atoms
969// so that a later call to P can emit a link from each atom to its origin.
970func Annotate(file *FileDescriptor, path string, atoms ...interface{}) *AnnotatedAtoms {
971 return &AnnotatedAtoms{source: *file.Name, path: path, atoms: atoms}
972}
973
974// printAtom prints the (atomic, non-annotation) argument to the generated output.
975func (g *Generator) printAtom(v interface{}) {

Callers 6

generateEnumMethod · 0.85
declMethod · 0.85
getterMethod · 0.85
declMethod · 0.85
getterMethod · 0.85
generateMessageStructMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected